RecoupGet a Free AuditFree Audit

API REFERENCE

Generate Video

On this page
POST/api/content/video

Generate a video from a text prompt, optionally animating a still image (image_url) or transitioning between two images (image_url + end_image_url).

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request POST \
  --url 'https://api.recoupable.dev/api/content/video' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "string",
  "prompt_expansion_mode": "balanced"
}'

Request body required

Video generation parameters

application/json

promptstringrequired

Text prompt for video generation

minLength: 1 · maxLength: 50000

prompt_expansion_modestring · enumrequired

How much effort to spend rewriting the prompt before generation. balanced returns in about a second. quality spends up to ~30s on a richer prompt.

Values: "balanced", "quality"

Default: "balanced"

image_urlstring

URL of the image to use as the first frame. When provided, the output aspect ratio follows this image. Generate an image first via POST /api/content/image if needed.

format: uri

end_image_urlstring

Optional URL of the image to use as the last frame, for first-to-last keyframe generation

format: uri

durationinteger

Duration of the generated video, in seconds

Default: 5

minimum: 5 · maximum: 15

resolutionstring · enum

The native generation resolution of the video

Values: "480P", "768P"

Default: "768P"

seedinteger

Random seed. A random seed is selected when omitted.

enable_safety_checkerboolean

If true, the safety checker will be enabled

Default: true

sync_modeboolean

Return the generated video as base64 instead of a CDN URL

Default: false

Responses

200Video generated successfully

application/json

videoUrlstringrequired

URL of the generated video

format: uri

400Validation failed — invalid or missing request body fields

application/json

errorstringrequired

Error message describing what went wrong

401Unauthorized — invalid or missing API key

application/json

errorstringrequired

Error message describing what went wrong

402Insufficient credits. Charged per second of output at the pinned model's rate ($0.08/s, MiniMax H3 Max). A free-tier account without sufficient credits receives a 402.

application/json

errorstringrequired

Error message describing what went wrong

500Internal server error

application/json

errorstringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download content.json
View operation source
json
{
  "description": "Generate a video from a text prompt, optionally animating a still image (`image_url`) or transitioning between two images (`image_url` + `end_image_url`).",
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "description": "Video generation parameters",
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ContentCreateVideoRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Video generated successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ContentCreateVideoResponse"
          }
        }
      }
    },
    "400": {
      "description": "Validation failed — invalid or missing request body fields",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ContentErrorResponse"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized — invalid or missing API key",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ContentErrorResponse"
          }
        }
      }
    },
    "402": {
      "description": "Insufficient credits. Charged per second of output at the pinned model's rate ($0.08/s, MiniMax H3 Max). A free-tier account without sufficient credits receives a 402.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ContentErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal server error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ContentErrorResponse"
          }
        }
      }
    }
  }
}