Create transcript
/v1/transcriptsTranscribes 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| asset_id | body | string | Yes | An audio or video asset you own, with a known duration. At most 30 minutes long. |
Request
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
{
"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.