{"openapi":"3.1.0","info":{"title":"LongScribe API","version":"1.0.0","description":"Create LongScribe transcription jobs, read completed transcripts, query the authenticated user's transcript library and create transcript-derived assets. All endpoints use the same LongScribe plan/minute entitlements as the web app."},"servers":[{"url":"https://staging.longscribe.com"}],"tags":[{"name":"Transcriptions"},{"name":"Library"}],"paths":{"/v1/transcriptions":{"post":{"tags":["Transcriptions"],"summary":"Create a transcription","operationId":"createTranscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTranscription"}}}},"responses":{"202":{"description":"Job accepted. The returned status reflects the current job state.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","description":"Usually queued; may already be completed when platform captions finish synchronously."}},"required":["id","status"]}}}},"401":{"description":"Invalid API key."},"402":{"description":"Account transcription allowance is exhausted."},"422":{"description":"Unsupported or invalid media URL."},"429":{"description":"API request rate limit exceeded."}}},"get":{"tags":["Transcriptions"],"summary":"List recent transcriptions","operationId":"listTranscriptions","responses":{"200":{"description":"Most recent 50 jobs.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transcription"}}}}}}}}}},"/v1/transcriptions/{job_id}":{"get":{"tags":["Transcriptions"],"summary":"Get transcription status or completed text","operationId":"getTranscription","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job. Transcript is returned only after completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcription"}}}},"404":{"description":"Job not found for this API-key owner."}}}},"/v1/library/ask":{"post":{"tags":["Library"],"summary":"Ask a grounded question across completed transcripts","operationId":"askLibrary","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskLibrary"}}}},"responses":{"200":{"description":"Grounded answer plus supporting transcript excerpts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskLibraryResponse"}}}}}}},"/v1/transcriptions/{job_id}/generate":{"post":{"tags":["Transcriptions"],"summary":"Create an asset from one completed transcript","operationId":"generateFromTranscript","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAsset"}}}},"responses":{"200":{"description":"Generated or cached asset.","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string"},"content":{"type":"string"},"cached":{"type":"boolean"},"provider":{"type":["string","null"]},"model":{"type":["string","null"]}}}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"LongScribe API key (ls_live_...)"}},"schemas":{"CreateTranscription":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"language":{"type":"string","default":"auto"},"mode":{"type":"string","enum":["auto","captions","whisper"],"default":"auto"},"translate_to_english":{"type":"boolean","default":false}}},"Transcription":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"stage":{"type":"string"},"progress":{"type":"integer"},"title":{"type":["string","null"]},"platform":{"type":["string","null"]},"duration":{"type":["integer","null"],"description":"Media duration in seconds."},"transcript":{"type":["string","null"]},"error":{"type":["string","null"]},"error_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"AskLibrary":{"type":"object","required":["question"],"properties":{"question":{"type":"string","maxLength":2000},"max_sources":{"type":"integer","minimum":1,"maximum":8,"default":6},"source_id":{"type":["string","null"]},"platform":{"type":["string","null"]},"date_from":{"type":["string","null"],"format":"date-time"},"date_to":{"type":["string","null"],"format":"date-time"},"job_ids":{"type":"array","items":{"type":"string"},"maxItems":50,"default":[]}}},"AskLibraryResponse":{"type":"object","properties":{"answer":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string"},"title":{"type":"string"},"timestamp":{"type":["string","null"]},"excerpt":{"type":["string","null"]},"platform":{"type":["string","null"]},"source_id":{"type":["string","null"]}}}},"provider":{"type":["string","null"]},"model":{"type":["string","null"]},"retrieval":{"type":["string","null"]}}},"GenerateAsset":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["summary","chapters","quotes","show_notes","blog","social"]},"refresh":{"type":"boolean","default":false}}}}},"security":[{"bearerAuth":[]}]}