Skip to main content
Glama
thenavidm
by thenavidm

Generate Asset

generate_asset
Destructive

Create a single image, video, or audio asset from a text prompt without rendering a full edit. Identical prompts return cached results at no charge.

Instructions

Generate a single image, video or audio asset from a text prompt without rendering a full edit. Submit a prompt-bearing asset; the response is immediate when an identical asset has been generated before (results are cached by prompt, model and options), otherwise the job is queued and can be polled via the status endpoint.

Generation is billed in credits per asset. Identical repeat requests resolve from the cache at no charge.

Base URL: https://api.shotstack.io/edit/{version} Explicit confirmation is required for this exact action; provider charges, hosting, sharing or deletion may apply. Never automatically resubmit unknown outcomes.

Input Schema

NameRequiredDescriptionDefault
assetNo
lengthNo
accountNoNamed private Shotstack account; selects private credentials and stage/v1 environment.
confirmNoSet true only when the user asked for exactly this action.
payloadNoComplete JSON request body instead of body flags. Preserves current endpoint fields and values.
payload_fileNoRegular local JSON body file, at most 5 MB. Cannot be mixed with body flags or payload.
idempotency_keyNoA key that makes this request its own generation. Retrying with the same key returns the job it first created instead of generating and billing again, and a new key generates afresh even when the asset matches an earlier one. Without a key, identical assets share one cached result. For 24 hours a key reused for a different asset is rejected; after that it returns its first result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv3.0.0
    • addedInput schema / $defs / length
      Added value: +{
      +  "description": "The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true for this exact requested render, generation, mutation, upload URL or deletion."New value: +"Set true only when the user asked for exactly this action."
    • addedInput schema / properties / length / $ref
      Added value: +"#/$defs/length"
    • removedInput schema / properties / length / description
      Removed value: -"The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it."
    • removedInput schema / properties / length / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / length / type
      Removed value: -"number"
    • addedInput schema / properties / payload / $defs / GenerationAsset / $ref
      Added value: +"#/$defs/GenerationAsset"
    • removedInput schema / properties / payload / $defs / GenerationAsset / additionalProperties
      Removed value: -false
    • removedInput schema / properties / payload / $defs / GenerationAsset / description
      Removed value: -"An image, video or audio asset to generate from a text prompt."
    • removedInput schema / properties / payload / $defs / GenerationAsset / properties
      Removed value: -{
      -  "model": {
      -    "description": "The generation model. Defaults to `nano-banana-2` for images, `seedance-2.0-text-to-video` for video and `elevenlabs-multilingual-v2` for audio. `GET /models` lists the models for each type.",
      -    "type": "string"
      -  },
      -  "options": {
      -    "additionalProperties": true,
      -    "description": "Settings for the chosen `model`. `GET /models` lists the options each model accepts; omitted options use the model's defaults and unknown or invalid options are rejected. A starting image for video goes in `startSrc` (`inputSrc` on the original image-to-video models) and a speech voice in `voice`.",
      -    "type": "object"
      -  },
      -  "prompt": {
      -    "description": "A description of the asset to generate. For text-to-speech models it is the text spoken.",
      -    "maxLength": 4000,
      -    "minLength": 1,
      -    "pattern": "\\S",
      -    "type": "string"
      -  },
      -  "type": {
      -    "description": "The kind of asset to generate.",
      -    "enum": [
      -      "image",
      -      "video",
      -      "audio"
      -    ],
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / payload / $defs / GenerationAsset / required
      Removed value: -[
      -  "type",
      -  "prompt"
      -]
    • removedInput schema / properties / payload / $defs / GenerationAsset / type
      Removed value: -"object"
    • addedInput schema / properties / payload / properties / length / $ref
      Added value: +"#/$defs/length"
    • removedInput schema / properties / payload / properties / length / description
      Removed value: -"The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it."
    • removedInput schema / properties / payload / properties / length / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / payload / properties / length / type
      Removed value: -"number"
  2. First observedv2.0.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the safety profile (destructive, open-world, non-idempotent); the description adds substantial behavior the annotations cannot convey: credit billing per asset, cache resolution by prompt/model/options with free repeats, queued-vs-immediate execution, polling, and the 24-hour idempotency-key reuse rule. This is exactly the extra context the low-annotation bar asks for.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence, followed by billing/caching and then the confirmation warning, so the structure is sound. The appended Base URL link and the somewhat boilerplate closing warning dilute it slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, nested-object, no-output-schema mutation tool, the description covers billing, caching, async queuing/polling, confirmation and idempotency. The main gap is that the job-identifier/return shape is not described, though polling is alluded to via the status endpoint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 71%, so most parameters are already documented in the schema. The description adds little parameter-level detail beyond restating that a prompt-bearing asset is submitted and that confirmation is required, so it neither compensates for the gap nor adds much beyond the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (generate a single image/video/audio asset) from a text prompt, and explicitly draws the boundary against the sibling render path ('without rendering a full edit'). An agent can distinguish this from render/render_template without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operational context: immediate from cache when identical, otherwise queued and polled via the status endpoint, plus an explicit confirmation requirement and a prohibition on automatic resubmission. It does not name competing sibling tools directly, so it falls short of the 5-level routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.