{"openapi":"3.1.0","info":{"title":"YouTubeTranscript.net API","version":"1.0.0","description":"Get YouTube transcripts with timestamps from your own code. Create an API key at https://youtubetranscript.net/account/api-keys (up to 10 per account) and send it as `Authorization: Bearer ytt_...`. Requests spend the same credits as the website: every account gets 3 free credits a day, and credit packs add more.","contact":{"email":"support@youtubetranscript.net","url":"https://youtubetranscript.net/api"}},"servers":[{"url":"https://api.youtubetranscript.net"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Transcripts"},{"name":"Library"},{"name":"Batches"},{"name":"Account"}],"paths":{"/v1/transcript":{"post":{"operationId":"createTranscript","summary":"Get a video's transcript","description":"Extracts the transcript (or serves it from cache) and saves it to your library. Charged in credits by video length, under the same rules as the website; a video already in your library is free. Answers 200 with the transcript when it is ready within `waitMs`, otherwise 202 with a job to poll.","tags":["Transcripts"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Retrying with the same key returns the same task instead of starting (and charging) another.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Send `url`, or `platform` + `externalId`.","properties":{"url":{"type":"string","description":"A YouTube watch / youtu.be / Shorts link, or a bare 11-character video id.","example":"https://www.youtube.com/watch?v=jNQXAC9IVRw"},"platform":{"type":"string","enum":["youtube"]},"externalId":{"type":"string"},"language":{"type":"string","description":"Comma-separated priority list. Each entry is a BCP-47 caption language (`en`, `pt-BR`), `auto` (the video's own captions in any language), `asr` (speech-to-text when there are no captions) or `asr-<code>` (speech-to-text in that language). Default `auto`.","default":"auto"},"format":{"type":"string","enum":["json","text"],"default":"json"},"includeTimestamp":{"type":"boolean","default":true,"description":"`json`: keep `start`/`duration` on segments. `text`: prefix lines with `[m:ss]`."},"sendMetadata":{"type":"boolean","default":false,"description":"Add a `metadata` object."},"waitMs":{"type":"integer","minimum":0,"maximum":10000,"description":"How long to hold the request for a fast result before answering 202 with a job (0–10000)."},"confirmCredits":{"type":"boolean","description":"A video costing more than 10 credits answers 409 `CREDITS_CONFIRMATION_REQUIRED` first; repeat with `true` to accept the cost."}}}}}},"responses":{"200":{"description":"The transcript.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptResult"}}}},"202":{"description":"Still working: poll the job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"`INVALID_REQUEST` or `INVALID_VIDEO`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`INSUFFICIENT_CREDITS`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NO_TRANSCRIPT` or `LANGUAGE_NOT_AVAILABLE` (with `availableLanguages`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`CREDITS_CONFIRMATION_REQUIRED`: repeat with `confirmCredits: true`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The video can not be transcribed (private, age-restricted, live…).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transcript/info":{"get":{"operationId":"getVideoInfo","summary":"Video details and caption languages (free)","tags":["Transcripts"],"parameters":[{"name":"url","in":"query","schema":{"type":"string"},"description":"Video link or id."},{"name":"platform","in":"query","schema":{"type":"string","enum":["youtube"]}},{"name":"externalId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Video details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoInfo"}}}},"400":{"description":"`INVALID_VIDEO`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transcript/job/{id}":{"get":{"operationId":"getTranscriptJob","summary":"Poll a transcript job","tags":["Transcripts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The job, or the finished transcript once `status` is `success`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TranscriptResult"},{"$ref":"#/components/schemas/Job"}]}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such job for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transcript/job/{id}/events":{"get":{"operationId":"streamTranscriptJob","summary":"Follow a job as Server-Sent Events","description":"Events: `snapshot` (the job now), `stage` (stage changed), then one of `completed` or `failed` carrying the same body as the poll endpoint.","tags":["Transcripts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"An event stream.","content":{"text/event-stream":{}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/transcripts":{"get":{"operationId":"listTranscripts","summary":"List the transcripts in your library","tags":["Library"],"parameters":[{"name":"q","in":"query","schema":{"type":"string"},"description":"Search titles and channels."},{"name":"lang","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["recent","oldest","title"],"default":"recent"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":24}}],"responses":{"200":{"description":"One page.","content":{"application/json":{"schema":{"type":"object","properties":{"transcripts":{"type":"array","items":{"$ref":"#/components/schemas/LibraryItem"}},"total":{"type":"integer"},"page":{"type":"integer"},"pageSize":{"type":"integer"},"langs":{"type":"array","items":{"type":"string"}}}}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/transcripts/{platform}/{externalId}":{"get":{"operationId":"getLibraryTranscript","summary":"Read a transcript from your library","tags":["Library"],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["youtube"]}},{"name":"externalId","in":"path","required":true,"description":"The 11-character YouTube video id (a full URL is also accepted, URL-encoded).","schema":{"type":"string"},"example":"jNQXAC9IVRw"},{"name":"language","in":"query","schema":{"type":"string"},"description":"Omit for the latest."}],"responses":{"200":{"description":"The saved transcript.","content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"$ref":"#/components/schemas/Transcript"},"cached":{"type":"boolean"}}}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NO_TRANSCRIPT`: not in your library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteLibraryTranscript","summary":"Remove a transcript from your library","tags":["Library"],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["youtube"]}},{"name":"externalId","in":"path","required":true,"description":"The 11-character YouTube video id (a full URL is also accepted, URL-encoded).","schema":{"type":"string"},"example":"jNQXAC9IVRw"},{"name":"language","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}}}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NO_TRANSCRIPT`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/transcripts/{platform}/{externalId}/download":{"get":{"operationId":"downloadTranscript","summary":"Download a transcript as a file","description":"Only transcripts your account extracted (see `POST /v1/transcript`).","tags":["Library"],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["youtube"]}},{"name":"externalId","in":"path","required":true,"description":"The 11-character YouTube video id (a full URL is also accepted, URL-encoded).","schema":{"type":"string"},"example":"jNQXAC9IVRw"},{"name":"format","in":"query","schema":{"type":"string","enum":["txt","srt","vtt","json","md"],"default":"txt"}},{"name":"language","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The file, with `Content-Disposition: attachment`.","content":{"text/plain":{},"application/x-subrip":{},"text/vtt":{},"application/json":{},"text/markdown":{}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`NO_TRANSCRIPT`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Your credits and limits","tags":["Account"],"responses":{"200":{"description":"Credits and limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch":{"post":{"operationId":"createBatch","summary":"Transcribe many videos, a playlist or a channel","description":"Send exactly one of `items`, `playlist` or `channel`. Up to `batch.itemsPerJob` videos (see `/v1/usage`); batches need a bought credit pack. Each video is charged when it finishes; failed videos are not charged.","tags":["Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","maxItems":500,"items":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}},"playlist":{"type":"string","description":"Playlist link or id."},"channel":{"type":"string","description":"Channel link, @handle or id."},"language":{"type":"string","description":"Comma-separated priority list. Each entry is a BCP-47 caption language (`en`, `pt-BR`), `auto` (the video's own captions in any language), `asr` (speech-to-text when there are no captions) or `asr-<code>` (speech-to-text in that language). Default `auto`.","default":"auto"},"limit":{"type":"integer","minimum":1,"maximum":500,"description":"Playlist / channel: at most this many videos."},"name":{"type":"string","maxLength":200}}}}}},"responses":{"202":{"description":"The batch was created and is running.","content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch"}}}}}},"400":{"description":"`INVALID_REQUEST`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`INSUFFICIENT_CREDITS` or batches not available before a purchase.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch/{batchId}":{"get":{"operationId":"getBatch","summary":"A batch and its videos","tags":["Batches"],"parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"maxResults","in":"query","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"pageToken","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The batch with one page of items.","content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BatchItem"}},"nextPageToken":{"type":"string"}}}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such batch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch/{batchId}/export":{"get":{"operationId":"exportBatch","summary":"Download a batch's transcripts","tags":["Batches"],"parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","description":"`zip` (one file per video), `csv` (one row per video), or the whole batch in one file.","schema":{"type":"string","enum":["zip","csv","txt","json","srt","vtt"],"default":"zip"}},{"name":"files","in":"query","description":"`zip` only: the format of each file.","schema":{"type":"string","enum":["txt","srt","vtt","json","csv"],"default":"txt"}},{"name":"timestamps","in":"query","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"responses":{"200":{"description":"The file.","content":{"application/zip":{},"text/csv":{},"application/json":{},"text/plain":{}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batch/{batchId}/retry":{"post":{"operationId":"retryBatch","summary":"Retry a finished batch's failed videos","tags":["Batches"],"parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The retried videos are running again (and are charged when they finish).","content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"$ref":"#/components/schemas/Batch"},"retried":{"type":"integer"},"credits":{"type":"integer"}}}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Still running, or nothing to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/library/batches/{batchId}":{"delete":{"operationId":"deleteBatch","summary":"Delete a batch","tags":["Batches"],"parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean"}}}}}},"401":{"description":"`API_KEY_REQUIRED` (no key sent) or `INVALID_API_KEY` (unknown or revoked).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`RATE_LIMITED`. Wait for `Retry-After` seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer ytt_...`. `X-API-Key: ytt_...` also works."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. `INVALID_VIDEO`, `NO_TRANSCRIPT`."},"message":{"type":"string"},"availableLanguages":{"type":"array","items":{"type":"string"}},"creditsRequired":{"type":"integer"},"creditsAvailable":{"type":"integer"}},"additionalProperties":true}}},"Segment":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"start":{"type":"number","description":"Seconds from the start of the video."},"duration":{"type":"number","description":"Seconds."}}},"Transcript":{"type":"object","required":["platform","externalId","lang","segments"],"properties":{"id":{"type":"string","format":"uuid"},"platform":{"type":"string","enum":["youtube"]},"externalId":{"type":"string"},"sourceUrl":{"type":"string"},"lang":{"type":"string","description":"Language of the transcript served."},"origin":{"type":"string","description":"`original` (uploaded captions), `auto` (YouTube auto captions) or `asr`."},"title":{"type":["string","null"]},"channel":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSec":{"type":["integer","null"]},"publishedAt":{"type":["string","null"],"format":"date-time"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}},"createdAt":{"type":"string","format":"date-time"}}},"VideoMetadata":{"type":"object","properties":{"platform":{"type":"string"},"externalId":{"type":"string"},"sourceUrl":{"type":"string"},"title":{"type":["string","null"]},"channel":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"publishedAt":{"type":["string","null"],"format":"date-time"},"lengthSeconds":{"type":["integer","null"]},"language":{"type":"string"}}},"TranscriptResult":{"type":"object","description":"A finished transcript. `format: json` carries `transcript`; `format: text` carries `text`.","required":["status","language","format"],"properties":{"status":{"type":"string","const":"success"},"jobId":{"type":"string","format":"uuid"},"cached":{"type":"boolean","description":"True when served from an existing result without a new extraction."},"language":{"type":"string"},"format":{"type":"string","enum":["json","text"]},"metadataStatus":{"type":"string","enum":["complete","partial","pending","unavailable"]},"lengthSeconds":{"type":["integer","null"]},"lengthText":{"type":"string","example":"3:33"},"metadata":{"$ref":"#/components/schemas/VideoMetadata"},"transcript":{"$ref":"#/components/schemas/Transcript"},"text":{"type":"string"}}},"Job":{"type":"object","description":"A transcript still being made. Poll `GET /v1/transcript/job/{id}`.","required":["status","jobId"],"properties":{"status":{"type":"string","enum":["pending","processing","failed"]},"jobId":{"type":"string","format":"uuid"},"stage":{"type":"string","description":"`queued`, `caption_fetch`, `asr`, `publishing`… (informational)."},"metadataStatus":{"type":"string"},"asrProcessedSec":{"type":"number"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"VideoInfo":{"type":"object","properties":{"platform":{"type":"string"},"externalId":{"type":"string"},"title":{"type":["string","null"]},"channel":{"type":["string","null"]},"channelId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"lengthSeconds":{"type":["integer","null"]},"lengthText":{"type":"string"},"publishedAt":{"type":["string","null"],"format":"date-time"},"description":{"type":["string","null"]},"chapters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"start":{"type":"number"}}}},"availableLanguages":{"type":"array","items":{"type":"string"}},"captionTracks":{"type":"array","items":{"type":"object","properties":{"lang":{"type":"string"},"autoGenerated":{"type":"boolean"}}}},"sourceUrl":{"type":"string"}}},"LibraryItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"platform":{"type":"string"},"externalId":{"type":"string"},"sourceUrl":{"type":"string"},"lang":{"type":"string"},"title":{"type":["string","null"]},"channel":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"words":{"type":"integer"},"durationSec":{"type":["integer","null"]},"starred":{"type":"boolean"},"origin":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"Usage":{"type":"object","properties":{"credits":{"type":"object","properties":{"balance":{"type":"integer","description":"Credits from packs you bought."},"freeToday":{"type":"object","properties":{"limit":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"resetsAt":{"type":"string","format":"date-time"}}},"available":{"type":"integer","description":"balance + free credits left today."},"hasPurchased":{"type":"boolean"}}},"batch":{"type":"object","properties":{"itemsPerJob":{"type":"integer","description":"0 until you buy a pack."}}},"limits":{"type":"object","properties":{"taskConcurrency":{"type":"integer"},"activeTasks":{"type":"integer"}}}}},"BatchCounts":{"type":"object","properties":{"total":{"type":"integer"},"pending":{"type":"integer"},"success":{"type":"integer"},"failed":{"type":"integer"}}},"Batch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"name":{"type":["string","null"]},"sourceType":{"type":"string"},"lang":{"type":"string"},"totalCredits":{"type":"integer"},"counts":{"$ref":"#/components/schemas/BatchCounts"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"BatchItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"platform":{"type":"string"},"externalId":{"type":"string"},"sourceUrl":{"type":"string"},"lang":{"type":"string"},"status":{"type":"string","enum":["pending","processing","success","failed"]},"title":{"type":["string","null"]},"channel":{"type":["string","null"]},"durationSec":{"type":["integer","null"]},"words":{"type":["integer","null"]},"error":{"type":["string","null"]}}}}}}