ENG-87567 docs: document audio transcription batches#277
Merged
Conversation
Adds an enum on CreateBatchRequest.endpoint covering all three supported values (chat completions plus audio transcriptions and translations) and two x-codeSamples (Python + cURL) demonstrating audio batch creation. The Python sample includes the per-line JSONL shape with `"method": "FILE"`, which is required for audio batches today. Surfaces the audio batch contract that previously only existed in code. Coordinates with ENG-87568 (service fix to drop the method:"FILE" requirement) — if that lands first the JSONL example here will be simplified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✱ Stainless preview builds for togetheraiThis PR will update the go openapi python terraform typescript
|
zainhas
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces the audio-batch contract in the API reference. The Batch API has supported
/v1/audio/transcriptionsand/v1/audio/translationsfor a while, but the spec only documented/v1/chat/completions, leaving customers to reverse-engineer the JSONL input shape (the ENG-87557 customer hit exactly this dead end).What changed
CreateBatchRequest.endpointis now constrained to an enum of the three supported values, with an inline description listing each.x-codeSamplesonPOST /batchesshowing audio batch creation (Python + cURL). The Python sample's leading comment documents the JSONL line shape, including the per-line"method": "FILE"field required for audio dispatch today.Coordination
docs/inference/batch/tutorial.mdxandoverview.mdx. Reference pagereference/batch-create.mdxauto-syncs from this spec via.github/workflows/sync-openapi-spec-to-docs.yml, so no manual edit needed there.method: "FILE"line in the Python sample's leading comment becomes obsolete and I'll simplify.Test plan
yamlfmtdrift from mainyamlfmt -dry -conf .yamlfmt openapi.yamlshows no new formatting issues attributable to this change (CI uses-dry, non-blocking)🤖 Generated with Claude Code