Files
/v1/files is the reusable document corpus behind the capability endpoints. Register a file once. Every later run then takes {"file": {"id": "…"}}. The platform does not fetch the document again and does not parse it again.
Files you register vs files a run creates
Both kinds are files, and an id addresses both. But they follow different rules:
A run that creates a file inline still returns its id. The parse is reusable inside that run’s TTL. If you plan to keep working with the document, register it first. Use keep to extend the lifetime of a run’s files after the fact.
Register by URL
This is the production-default path. The platform fetches the bytes server-side over http(s).
With a url, the platform sniffs the MIME type from the response. It drops any mimeType you send with the url. Send url or name + mimeType, not both.
Sources must serve a Content-Length. The fetch streams directly into storage. An origin that answers with chunked transfer encoding, or with compressed content and no usable length, fails with 502 file_upload_failed. Static file hosts work. HTML pages and gzip-encoded endpoints often do not. Upload those with a presigned PUT instead.
Presigned upload
Use this for local files, large files, and files not reachable by URL. No multipart. Pure JSON.
Reserve the record
The response carries uploadUrl and uploadExpiresAt. The URL is valid for 15 minutes.
Read a file
urls.content is the original bytes. urls.markdown and urls.json are the parse byproducts. They appear only after the document was parsed. All three URLs are signed and expire after about 1 hour. Fetch the content. Do not store the URL.
Audio transcripts
Audio and video produce no markdown byproduct. urls.markdown stays absent for them. The transcript is urls.json.
Fetch that URL to read the transcript. The body is one object with a detected language and an ordered segments array.
Join every segments[].text in order to rebuild the transcript as plain text.
transcribe and transcribe_diarize both return word-level timings. Only transcribe_diarize adds speaker. Choose transcribe when speaker labels do not matter.
Speaker labels are positional, not identities. SPEAKER_00 is the first voice the platform separated. The same person can get a different label in another recording.
A word the aligner cannot place comes back without start and end. This is rare. Fall back to the segment timing for those words.
Where the transcript arrives, per surface
The transcript is the same object everywhere. Only the delivery differs.
On /process, format=markdown returns null for audio content. Audio has no markdown byproduct. Always ask for format=json on a recording.
List and delete
?limit caps the page (1–200, default 50), newest first. There is no cursor today. Paging is by limit only. DELETE returns 204 and removes the parse byproducts with the file. Runs that already used the file keep their results.
Processing
processing selects how the platform reads the document. It applies when you register the file, and again in file.processing on any capability call.
Parsing is automatic. A capability parses what is not parsed and never re-parses what is. A parse call first is optional, not a prerequisite.
Reuse a file
Parse once, run many. Several narrow extractions, a redaction, and a fill can all read the same file id. None re-reads the document. Send up to 100 file refs in one run with files: [...].