REST API
API quickstart
Authenticate and fetch your first transcript with the TubeOnAI REST API.
1. Create an API key
Open Settings → AI & developer tools → API in your TubeOnAI workspace. Create a key and copy it. The key is only shown once. Keep it in an environment variable on your server or workstation.
2. Request a transcript
Set TUBEONAI_API_KEY in your shell. Replace the example video URL with a public video that has captions.
export TUBEONAI_BASE_URL="https://beta.app.tubeonai.com"
curl -sS -X POST "$TUBEONAI_BASE_URL/v1/ai/transcript" \
-H "Authorization: Bearer $TUBEONAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'3. Read the result
- 200 ready — Read
content. Ifnext_cursoris set, send a new transcript request with the returnedidand that value ascursor. - 202 pending — Wait for
retry_after_sec, then send a new transcript request with the returnedidand"poll_only": true. - Error — Read
error.codeanderror.message. If captions are unavailable, the API may return a consent error with a price estimate. Approve the price before explicitly enabling paid transcription.
Browse the endpoint reference for request schemas and code samples. See the REST API guide for complete responses, uploads, and errors. Download the OpenAPI spec to use it in your own tools.