Browse the API docs
Endpoint reference

Transcripts

The Crayo Transcripts API transcribes an audio or video asset you own and returns the full text with word-level timings in milliseconds. It costs 1 voiceover credit per second of media, and repeating the request for the same asset returns the cached transcript for free.

Create transcript

POST/v1/transcripts

Transcribes an audio or video asset you own and returns the full text plus word-level timings in milliseconds. Use it to cut scenes on sentence boundaries, build search indexes, or drive your own caption rendering.

  • Transcripts are cached on the asset. Asking for the same asset again returns the stored transcript and costs nothing.
Credits:
1 voiceover credit per second of media
Rate limit:
Heavy tier, 2/s and 10/min

Parameters

NameInTypeRequiredDescription
asset_idbodystringYesAn audio or video asset you own, with a known duration. At most 30 minutes long.

Request

curl
curl -X POST "https://api.crayo.ai/v1/transcripts" \
  -H "Authorization: Bearer $CRAYO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "asset_id": "cm7x1k2p40001abcd"
}'

Response

200 application/json
{
  "success": true,
  "transcript": {
    "asset_id": "cm7x1k2p40001abcd",
    "language": "en",
    "text": "Three habits that quietly ruin your mornings",
    "words": [
      {
        "word": "Three",
        "start_ms": 120,
        "end_ms": 410
      },
      {
        "word": "habits",
        "start_ms": 410,
        "end_ms": 780
      }
    ]
  }
}

Errors

  • 400INVALID_ASSET_TYPEThe asset is an image rather than audio or video.
  • 400MEDIA_DURATION_UNKNOWNThe duration could not be read. Upload the file again.
  • 400MEDIA_TOO_LONGThe media runs longer than 30 minutes.
  • 401MISSING_API_KEYNo Authorization header was sent, or it does not carry a crayo_sk_ key.
  • 401UNAUTHORIZEDThe key sent is malformed, expired, or revoked.
  • 402INSUFFICIENT_CREDITSYour voiceover balance is below the media duration.
  • 404NOT_FOUNDNo asset with that id belongs to your account.
  • 429RATE_LIMITEDOver the rate limit. Wait Retry-After seconds.
  • 500SERVER_ERRORSomething failed on our side. Retry with backoff.
New to the Crayo API? See what it is forUse cases, pricing and the console walkthrough live on the API feature page.

FAQs

Frequent questions

1 voiceover credit per second of media, charged when the request is accepted. Transcripts are cached on the asset, so a second request for the same asset_id costs nothing.

At most 30 minutes. Longer media returns 400 MEDIA_TOO_LONG, and an asset with no known duration returns 400 MEDIA_DURATION_UNKNOWN.

The transcript object carries asset_id, the detected language, the full text and a words array where each word has start_ms and end_ms.

POST /v1/transcripts is in the heavy tier: 2 requests per second and 10 per minute per key.

Still have questions?

Contact our 24/7 support team for any concerns or inquiries.

Get in touch