Generate media with AI (video, image, or Manim animation)
Generate a new media item from a text prompt: text-to-video, text-to-image, image-to-video, or a programmatic Manim animation (generator 'auto' picks the best one for the prompt). Async — returns a media id that flips to ready when generation finishes; poll GET /media/:id or register a media.completed webhook. Priced on what the model actually costs; refused with 402 if your balance cannot cover the quote (see GET /me).
API key auth. Prefix cf_live_ for production orgs, cf_test_ for sandbox.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /media/generate body.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/media/generate" \ -H "Content-Type: application/json" \ -d '{ "generator": "text-to-video", "prompt": "string" }'{ "id": "string", "status": "generating", "workflowId": "string", "estimateUsd": 0}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}