{"openapi":"3.0.3","info":{"title":"Blab API","version":"1.0.0","description":"AI voice infrastructure — TTS, STT, voice cloning, batch, dubbing, webhooks. All responses use the `{ ok, data, meta }` envelope; errors use `{ ok:false, error }`. Auth: `Authorization: Bearer <JWT or blab_sk_… API key>`. Long jobs return `{ jobId }` (poll `GET /api/jobs/:id` or stream `GET /api/jobs/:id/events`)."},"servers":[{"url":"/","description":"This server"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Auth"},{"name":"Models"},{"name":"TTS"},{"name":"STT"},{"name":"Voices"},{"name":"Batch"},{"name":"Dubbing"},{"name":"Jobs"},{"name":"Projects"},{"name":"Webhooks"},{"name":"Usage"},{"name":"API Keys"},{"name":"Agents"}],"paths":{"/api/auth/register":{"post":{"tags":["Auth"],"summary":"Register a user + default workspace","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthResult"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Register"}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"Log in","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AuthResult"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}}}},"/api/auth/me":{"get":{"tags":["Auth"],"summary":"Current user + workspaces","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/models":{"get":{"tags":["Models"],"summary":"Live model list (Qevron discovery)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/capabilities":{"get":{"tags":["Models"],"summary":"Live capabilities","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/tts":{"post":{"tags":["TTS"],"summary":"Synthesize speech (async job)","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: tts:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsCreate"}}}}}},"/api/tts/{id}":{"get":{"tags":["TTS"],"summary":"Get a TTS job (+ signed audioUrl)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: tts:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/tts/{id}/regenerate":{"post":{"tags":["TTS"],"summary":"Re-run a TTS job","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: tts:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/tts/stream":{"post":{"tags":["TTS"],"summary":"Stream synthesis — SSE of base64 audio chunks (play-as-you-go)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"text/event-stream — `chunk` (base64 audio) frames then `done`"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: tts:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TtsCreate"}}}}}},"/api/stt":{"post":{"tags":["STT"],"summary":"Transcribe audio/video (multipart, async job)","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: stt:write.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string"},"language":{"type":"string"},"label":{"type":"string"}},"required":["file"]}}}}}},"/api/stt/{id}":{"get":{"tags":["STT"],"summary":"Get a transcription job","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: stt:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/stt/{id}/export":{"get":{"tags":["STT"],"summary":"Export transcript (txt|srt|vtt|json)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Transcript export","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: stt:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","schema":{"type":"string","enum":["txt","srt","vtt","json"]}}]}},"/api/voices":{"get":{"tags":["Voices"],"summary":"List workspace voices","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: voices:read.","parameters":[{"name":"source","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}]}},"/api/voices/catalog":{"get":{"tags":["Voices"],"summary":"Live builtin voice catalog","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: voices:read.","parameters":[{"name":"model","in":"query","schema":{"type":"string"}}]}},"/api/voices/samples":{"post":{"tags":["Voices"],"summary":"Upload a clone reference clip (multipart)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: voices:write.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string"},"language":{"type":"string"},"label":{"type":"string"}},"required":["file"]}}}}}},"/api/voices/clone":{"post":{"tags":["Voices"],"summary":"Create a cloned voice (consent required, async)","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: voices:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceClone"}}}}}},"/api/voices/{id}":{"get":{"tags":["Voices"],"summary":"Get a voice","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Voice"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: voices:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"tags":["Voices"],"summary":"Delete a voice","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: voices:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/batch":{"post":{"tags":["Batch"],"summary":"Batch TTS fan-out (async job)","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: batch:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreate"}}}}}},"/api/batch/{id}":{"get":{"tags":["Batch"],"summary":"Get a batch job + per-item results","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: batch:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/batch/{id}/items/{index}":{"delete":{"tags":["Batch"],"summary":"Delete one clip from a batch (audio + generation doc cascade)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: batch:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}}]}},"/api/dubbing/source":{"post":{"tags":["Dubbing"],"summary":"Upload source media (multipart)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: dubbing:write.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string"},"language":{"type":"string"},"label":{"type":"string"}},"required":["file"]}}}}}},"/api/dubbing":{"post":{"tags":["Dubbing"],"summary":"Dub audio/video to another language (async job)","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: dubbing:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DubbingCreate"}}}}}},"/api/dubbing/{id}":{"get":{"tags":["Dubbing"],"summary":"Get a dubbing job + signed outputs","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: dubbing:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/jobs":{"get":{"tags":["Jobs"],"summary":"List jobs","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: jobs:read.","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["tts","stt","voice_clone","dubbing","batch","webhook","cleanup"]}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}]}},"/api/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Get a job","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Job"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: jobs:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"tags":["Jobs"],"summary":"Delete a terminal job (cascades storage artifacts; 409 while active)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: jobs:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/jobs/{id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel a job","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: jobs:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/jobs/{id}/retry":{"post":{"tags":["Jobs"],"summary":"Retry a failed job","security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/JobRef"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: jobs:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/jobs/{id}/events":{"get":{"tags":["Jobs"],"summary":"SSE progress stream (text/event-stream)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SSE stream of progress/completed/failed events"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: jobs:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/projects":{"get":{"tags":["Projects"],"summary":"List projects","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: projects:read.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}]},"post":{"tags":["Projects"],"summary":"Create a project","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: projects:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}}}},"/api/projects/{id}":{"patch":{"tags":["Projects"],"summary":"Update a project","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: projects:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}}},"delete":{"tags":["Projects"],"summary":"Delete a project","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: projects:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: webhooks:read."},"post":{"tags":["Webhooks"],"summary":"Create a webhook (secret returned once)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Webhook"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: webhooks:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}}}},"/api/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Webhook"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: webhooks:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"tags":["Webhooks"],"summary":"Update a webhook","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Webhook"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: webhooks:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: webhooks:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Recent delivery attempts","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: webhooks:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/usage":{"get":{"tags":["Usage"],"summary":"Usage totals","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UsageSummary"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: usage:read."}},"/api/usage/breakdown":{"get":{"tags":["Usage"],"summary":"Usage breakdown by model/type/day","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UsageBreakdown"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: usage:read.","parameters":[{"name":"days","in":"query","schema":{"type":"integer","default":30}}]}},"/api/usage/events":{"get":{"tags":["Usage"],"summary":"Usage events (paginated)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageEvent"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: usage:read.","parameters":[{"name":"type","in":"query","schema":{"type":"string"}},{"name":"model","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}]}},"/api/agents":{"get":{"tags":["Agents"],"summary":"List voice agents","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:read."},"post":{"tags":["Agents"],"summary":"Create a voice agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Agent"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}}}},"/api/agents/{id}":{"get":{"tags":["Agents"],"summary":"Get an agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Agent"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"tags":["Agents"],"summary":"Update an agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Agent"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}}},"delete":{"tags":["Agents"],"summary":"Delete an agent","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/agents/{id}/turn":{"post":{"tags":["Agents"],"summary":"One conversation turn (multipart user audio → transcript + reply + spoken reply URL)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AgentTurnResult"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string"},"language":{"type":"string"},"label":{"type":"string"}},"required":["file"]}}}}}},"/api/agents/{id}/turns":{"get":{"tags":["Agents"],"summary":"Conversation history","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: agents:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/api-keys":{"get":{"tags":["API Keys"],"summary":"List API keys","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyInfo"}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: api-keys:read."},"post":{"tags":["API Keys"],"summary":"Create an API key (full key returned once)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ApiKeyCreated"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: api-keys:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}}}},"/api/api-keys/{id}":{"delete":{"tags":["API Keys"],"summary":"Revoke an API key","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"data":{"type":"object"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}}}},"required":["ok","data"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"Required API-key scopes: api-keys:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A user JWT or a `blab_sk_…` API key."}},"schemas":{"ErrorResponse":{"type":"object","properties":{"ok":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","UNAUTHENTICATED","FORBIDDEN","NOT_FOUND","RATE_LIMITED","MODEL_UNAVAILABLE","PROVIDER_ERROR","PAYLOAD_TOO_LARGE","CONSENT_REQUIRED","IDEMPOTENCY_CONFLICT","REGISTRATION_CLOSED","NOT_IMPLEMENTED","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","nullable":true}},"required":["code","message"]},"meta":{"type":"object","properties":{"requestId":{"type":"string"}}}},"required":["ok","error"]},"JobRef":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"}}},"Job":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tts","stt","voice_clone","dubbing","batch","webhook","cleanup"]},"status":{"type":"string"},"progress":{"type":"integer"},"output":{"type":"object","nullable":true},"error":{"type":"object","nullable":true},"createdAt":{"type":"string"}}},"Register":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8},"name":{"type":"string"}},"required":["email","password","name"]},"Login":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"AuthResult":{"type":"object","properties":{"token":{"type":"string"},"user":{"type":"object"},"workspaces":{"type":"array","items":{"type":"object"}}}},"Model":{"type":"object","properties":{"id":{"type":"string"},"modality":{"type":"string"}}},"TtsCreate":{"type":"object","properties":{"model":{"type":"string","enum":["blab-stable","blab-expressive"],"example":"blab-stable","description":"blab-stable = fast engine (streaming, cloned voices, all formats). blab-expressive = emotional engine (curated voices, mp3/wav, no streaming)."},"input":{"type":"string"},"voice":{"type":"string"},"language":{"type":"string","enum":["ar","bg","cs","da","de","el","en","es","et","fi","fr","hi","hr","hu","id","it","ja","ko","lv","nl","pl","pt","ro","ru","sk","sl","sv","tr","uk","vi"],"description":"Explicit synthesis language (omitted ⇒ auto-detect)"},"response_format":{"type":"string","enum":["mp3","wav","opus","aac","flac"],"default":"mp3"},"speed":{"type":"number","minimum":0.25,"maximum":4},"delivery":{"type":"string","enum":["verbatim","natural","expressive"],"default":"verbatim","description":"LLM prosody pre-pass before synthesis. `natural` repairs punctuation/rhythm for delivery; `expressive` additionally inserts sparing expression tags (verified per language: tr: <breath> <sigh> <laugh> <clear> · en: <laugh> <sigh>; other languages get natural-level treatment). Words are never changed — the job's take shows the exact spoken script, whose length is what gets billed. Ignored on /api/tts/stream."},"polish":{"type":"boolean","default":false,"description":"Broadcast post-chain on the rendered audio: de-esser → gentle 2:1 compression → EBU R128 loudness normalization (-16 LUFS) → true-peak limiter."},"emotion":{"type":"integer","minimum":0,"maximum":100,"description":"Emotion intensity — blab-expressive only (mapped to the engine's exaggeration). Omitted ⇒ engine default (~55)."}},"required":["model","input"]},"VoiceClone":{"type":"object","properties":{"name":{"type":"string"},"sampleStorageKey":{"type":"string"},"language":{"type":"string"},"consent":{"type":"boolean","enum":[true]}},"required":["name","sampleStorageKey","consent"]},"Voice":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"providerVoiceId":{"type":"string"},"sourceType":{"type":"string"},"previewUrl":{"type":"string"}}},"BatchCreate":{"type":"object","properties":{"model":{"type":"string"},"voice":{"type":"string"},"language":{"type":"string","enum":["ar","bg","cs","da","de","el","en","es","et","fi","fr","hi","hr","hu","id","it","ja","ko","lv","nl","pl","pt","ro","ru","sk","sl","sv","tr","uk","vi"]},"response_format":{"type":"string","enum":["mp3","wav","opus","aac","flac"]},"polish":{"type":"boolean","default":false,"description":"Broadcast polish chain applied to every clip (see TtsCreate.polish)."},"items":{"type":"array","maxItems":200,"items":{"type":"object","properties":{"input":{"type":"string"},"voice":{"type":"string"}},"required":["input"]}}},"required":["model","items"]},"DubbingCreate":{"type":"object","properties":{"sourceStorageKey":{"type":"string"},"sourceLanguage":{"type":"string"},"targetLanguage":{"type":"string"},"voice":{"type":"string"},"model":{"type":"string","default":"blab-stable"},"translateModel":{"type":"string","default":"verinova-stable"},"format":{"type":"string","enum":["mp3","wav","opus","aac","flac"]}},"required":["sourceStorageKey","targetLanguage","voice"]},"ProjectCreate":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name"]},"WebhookCreate":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","tts.completed","tts.failed","stt.completed","stt.failed","voice_clone.completed","voice_clone.failed","dubbing.completed","dubbing.failed","batch.completed","batch.failed","job.completed","job.failed"]}},"enabled":{"type":"boolean","default":true}},"required":["url","events"]},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"secret":{"type":"string","description":"Returned only at creation."}}},"UsageSummary":{"type":"object","properties":{"tokens":{"type":"integer"},"audioSeconds":{"type":"integer"},"cost":{"type":"number"},"count":{"type":"integer"}}},"UsageEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"model":{"type":"string"},"tokens":{"type":"integer"},"cost":{"type":"number"},"createdAt":{"type":"string"}}},"UsageBreakdown":{"type":"object","properties":{"byModel":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UsageBucket"}},"byType":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UsageBucket"}},"byDay":{"type":"array","items":{"allOf":[{"type":"object","properties":{"day":{"type":"string"}}},{"$ref":"#/components/schemas/UsageBucket"}]}}}},"UsageBucket":{"type":"object","properties":{"count":{"type":"integer"},"tokens":{"type":"integer"},"cost":{"type":"number"}}},"ApiKeyCreate":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["tts:write","tts:read","stt:write","stt:read","voices:read","voices:write","batch:read","batch:write","dubbing:read","dubbing:write","webhooks:read","webhooks:write","projects:write","projects:read","jobs:read","usage:read","api-keys:read","api-keys:write","agents:read","agents:write"]}},"expiresAt":{"type":"string","format":"date-time"}},"required":["name","scopes"]},"ApiKeyCreated":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"Full secret — shown ONCE."},"prefix":{"type":"string"}}},"ApiKeyInfo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"lastUsedAt":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}}},"AgentCreate":{"type":"object","properties":{"name":{"type":"string"},"systemPrompt":{"type":"string"},"model":{"type":"string","default":"verinova-stable","description":"chat/LLM model"},"ttsModel":{"type":"string","default":"blab-stable"},"voice":{"type":"string","default":"default"},"language":{"type":"string"}},"required":["name"]},"Agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"model":{"type":"string"},"ttsModel":{"type":"string"},"voice":{"type":"string"},"systemPrompt":{"type":"string"}}},"AgentTurnResult":{"type":"object","properties":{"turnId":{"type":"string"},"userTranscript":{"type":"string"},"assistantText":{"type":"string"},"assistantAudioUrl":{"type":"string"},"durationMs":{"type":"integer"}}}}}}