Faraatarjomeh API
Pages

For AI agents: this page as Markdown at https://faraatarjomeh.com/api/v1/docs/reference/uploads.md; all docs in one file at llms-full.txt.

API reference: Uploads

The Uploads endpoints (4 operations), generated from the OpenAPI document (https://faraatarjomeh.com/api/v1/openapi.json). For task-level walkthroughs use the guides; for error handling use /api/v1/docs/errors. The full reference: /api/v1/docs/reference.

At a glance#

Index#

Uploads#

Send a large recording or video in chunks, then make a meeting, transcription or video job from it.

POST /api/v1/uploads#

Start a chunked upload

Starts an upload for a meeting or transcription recording, or for a video to translate, up to 1 GB. Free: nothing is held or charged until the job is created. Counts as one upload toward the per-account upload limit; the chunks and the job create made from it do not. The answer gives chunkSize and totalChunks. An upload not used within 24 hours is deleted. At most 10 uploads can be open at once (UPLOAD_LIMIT_REACHED). When we are short of room for a very large file the answer is 503 SERVICE_UNAVAILABLE with Retry-After.

Parameters

Name In Type Required Notes
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json (required)

UploadStartRequest

Response 201

UploadSession

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/uploads" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"purpose":"meeting","size":1}'

GET /api/v1/uploads/{uploadId}#

Read an upload

received lists the chunks that arrived. After a lost connection, send only the missing ones. A used upload shows status: used and its jobId.

Parameters

Name In Type Required Notes
uploadId path string yes Upload id (upl_...) returned when the upload started.

Response 200

UploadSession

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/uploads/$UPLOAD_ID" \
  -H "Authorization: Bearer $FARA_API_KEY"

DELETE /api/v1/uploads/{uploadId}#

Cancel an upload

Deletes the chunks. Cancelling again answers 204 too. An upload that already made a job answers 409 UPLOAD_ALREADY_USED.

Parameters

Name In Type Required Notes
uploadId path string yes Upload id (upl_...) returned when the upload started.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/uploads/$UPLOAD_ID" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

PUT /api/v1/uploads/{uploadId}/chunks/{index}#

Send one chunk

The body is the chunk's raw bytes (Content-Type: application/octet-stream). Index 0 is the start of the file. Every chunk is exactly chunkSize bytes except the last, which is the rest (BAD_CHUNK otherwise). Chunks can come in any order and in parallel. Sending the same index again replaces it, so a retry after a timeout is always safe and needs no Idempotency-Key. With a Content-Digest header (RFC 9530, sha-256=:<base64>:) a chunk that does not match is refused with CHUNK_DIGEST_MISMATCH. Counts toward the per-key request limit, not toward the upload limit.

Parameters

Name In Type Required Notes
uploadId path string yes Upload id (upl_...) returned when the upload started.
index path integer yes Chunk index, from 0 to totalChunks - 1. — min 0
Content-Digest header string no Optional RFC 9530 digest of this chunk, for example sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/octet-stream (required)

Response 200

UploadSession

Responses

Example

curl
curl -sS -X PUT "https://faraatarjomeh.com/api/v1/uploads/$UPLOAD_ID/chunks/$INDEX" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Schemas#

Named request and response objects used above. Nested objects are flattened as parent.child; arrays as parent[].child.

UploadSession#

Field Type Required Notes
uploadId string yes Upload id (upl_...). Send it as uploadId when you create the job.
purpose string no one of: meeting, transcription, video
filename string no
size integer no The whole file's size in bytes.
chunkSize integer yes Bytes in every chunk except the last.
totalChunks integer yes How many chunks make the file. Indexes run from 0 to totalChunks - 1.
received integer[] yes Indexes of the chunks that have arrived, in order. After a lost connection, send only the others.
status string no open (taking chunks), or used (a job was made from it). — one of: open, used
jobId string | null no The job made from this upload, once status is used. — may be null
createdAt string | null no may be null
expiresAt string | null yes When an unused upload and its chunks are deleted (24 hours after it started). — may be null

UploadStartRequest#

Field Type Required Notes
purpose string yes What the file will make: meeting (POST /api/v1/meetings/jobs), transcription (POST /api/v1/transcription/jobs) or video (POST /api/v1/video/jobs). — one of: meeting, transcription, video
filename string no The file's name (up to 255 characters). Kept as the job's file name.
contentType string no Optional. An audio or video type, for example audio/mp4. The file itself is checked when the job is created.
size integer yes The whole file's size in bytes, at most 1073741824. — min 1
sha256 string no Optional. SHA-256 of the whole file, 64 hex characters. When given, the joined file is checked against it when the job is created.
chunkSize integer no Optional. Bytes per chunk, from 262144 (256 KB) to 8388608 (8 MB, the default). Ask for smaller chunks on a slow or unstable line, so each chunk is sent before the line drops. Out of range answers 400 BAD_REQUEST with minChunkSize and maxChunkSize. — min 262144; max 8388608