{"openapi":"3.1.0","info":{"title":"Stenobird API","version":"0.1.0","description":"Create transcripts from public audio URLs."},"servers":[{"url":"https://stenobird.com"}],"paths":{"/v1/pricing":{"get":{"summary":"Get pricing","operationId":"getPricing","responses":{"200":{"description":"Pricing and billing details."}}}},"/v1/billing/checkout":{"post":{"summary":"Start checkout","operationId":"createCheckout","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Checkout started."}}}},"/v1/billing/checkout-sessions/{checkout_session_id}":{"get":{"summary":"Get the API key after checkout","operationId":"claimCheckoutApiKey","parameters":[{"name":"checkout_session_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Api-Key-Claim-Token","in":"header","required":true,"schema":{"type":"string"},"description":"Token returned when checkout starts."}],"responses":{"200":{"description":"Checkout verified and API key returned."},"402":{"description":"Checkout is not complete."}}}},"/v1/transcripts":{"post":{"summary":"Create a transcript","operationId":"createTranscript","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Use the same value to safely retry a request."}],"security":[{"bearerAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["audio_url"],"properties":{"audio_url":{"type":"string","format":"uri","description":"Any audio URL."},"webhook_url":{"type":"string","format":"uri","description":"Optional callback URL for completion or failure."}}},"examples":{"mp3":{"value":{"audio_url":"https://example.com/audio-url"}}}}}},"responses":{"201":{"description":"Transcript request created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptJob"}}}},"400":{"description":"Invalid or unsupported URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Account billing is not active.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Audio file is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Audio content type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Audio URL could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/transcripts/{id}":{"get":{"summary":"Get transcript status","operationId":"getTranscriptJob","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transcript status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptJob"}}}}}}},"/v1/transcripts/{id}/events":{"get":{"summary":"Stream transcript events","operationId":"streamTranscriptEvents","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transcript events.","content":{"text/event-stream":{"schema":{"type":"string","examples":["event: transcript\\ndata: {\"text\":\"Hello and welcome to...\"}\\n\\n"]}}}}}}},"/v1/transcripts/{id}/result":{"get":{"summary":"Get the final transcript","operationId":"getTranscriptResult","security":[{"bearerAuth":[]},{}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Final transcript."},"409":{"description":"Transcript is not complete."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"TranscriptJob":{"type":"object","required":["id","status","mode","status_url","poll_url","events_url","result_url","terminal","result_ready"],"properties":{"id":{"type":"string"},"mode":{"type":"string","enum":["preview","account"]},"status":{"type":"string","enum":["queued","transcribing","preview_complete","completed","failed","canceled"]},"status_url":{"type":"string"},"poll_url":{"type":"string"},"events_url":{"type":"string"},"result_url":{"type":"string"},"terminal":{"type":"boolean"},"result_ready":{"type":"boolean"},"retry_after_seconds":{"type":["integer","null"]},"source_url":{"type":["string","null"]},"audio_seconds":{"type":["number","null"]},"billable_minutes":{"type":["integer","null"]},"error":{"type":["string","null"]},"locked":{"type":"boolean"},"preview_seconds":{"type":["number","null"]},"requires_api_key":{"type":"boolean"},"message":{"type":["string","null"]},"detail":{"type":["string","null"]},"upgrade_url":{"type":["string","null"]}}},"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["invalid_url","unsupported_url","audio_unreachable","audio_source_not_found","audio_source_unreachable","directory_lookup_failed","extractor_unavailable","audio_content_type_not_supported","audio_too_large","transcription_failed","billing_failed","transcript_not_ready","queue_busy","webhook_requires_api_key","rate_limited"]},"message":{"type":"string"},"accepted_url_examples":{"type":"array","items":{"type":"string"}},"unsupported_url_examples":{"type":"array","items":{"type":"string"}}}}}}}