Saltar al contenido

AI video generation API

Send a prompt, get back a finished video: Yoh writes the script, casts consistent characters, adds voices, music and captions and renders the MP4. Or drive each step yourself: stories, series, clips, characters, timeline and renders.

Your first video in three calls

  1. Create a key

    Sign in, open Settings → API keys and create a key with stories:generate and stories:read. It is shown once; keep it in a server-side secret. Check it:

    curl https://www.yoh.app/api/v1/credits \
      -H "Authorization: Bearer $YOH_API_KEY"
  2. Generate

    X-Max-Generation-Credits is your consent: the most credits you accept for this request. A higher price returns HTTP 409 with the quote and charges nothing. Reuse the same Idempotency-Key to retry safely.

    curl -X POST https://www.yoh.app/api/v1/stories/generate \
      -H "Authorization: Bearer $YOH_API_KEY" \
      -H "X-Max-Generation-Credits: 500" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: my-first-video-1" \
      -d '{ "prompt": "A dragon teaches a young knight how to fly", "contentType": "cinematic_story", "aspectRatio": "16:9", "scope": "full", "renderVideo": true }'
  3. Poll the job

    Poll every 20 seconds until the status is completed; the answer carries the storyId and the videoUrl of the MP4.

    curl https://www.yoh.app/api/v1/stories/jobs/JOB_ID \
      -H "Authorization: Bearer $YOH_API_KEY"

Why it works well

Full control when you want it

Create a series and its cast once, then make episodes in it; edit clips, regenerate one clip's picture or video, start from your own uploaded video, and render the timeline you choose.

Spending you can predict

Every paid request needs a credit cap or an accepted quote. Free previews (estimate, quoteOnly, dryRun) tell you the price before anything starts.

Built for retries

Idempotency keys on generation, durable jobs you can poll and cancel, and clear terminal states.

Prefer an agent?

The same account and scopes work over MCP, so Claude or Codex can call Yoh for you.

Questions

Is there an API to generate AI videos from text?

Yes. POST /api/v1/stories/generate takes a prompt and returns a job; when it completes you get a rendered MP4 with script, characters, voices, music and captions.

How is the API priced?

It uses the same Yoh credits as the app. Each paid request states the most credits you accept, and you can get the exact price first from the free estimate endpoints.

Can I keep the same characters across videos?

Yes. Create a series with its characters once, then generate episodes inside it; every episode reuses the same cast.

Where is the full reference?

The docs list every endpoint, scope and error with a live playground.

Full reference: Yoh docs · Pricing · OpenAPI 3.1

Other ways to connect