Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your secret key, rk_test_… or rk_live_…, sent as Authorization: Bearer <key>. Keep it on your server. Restricted keys carry only the scopes you give them.

Headers

Reflections-Version
string

The dated API version. Defaults to the version your account is pinned to.

Example:

"2026-10-15"

Reflections-Account
string

Act for a connected licensee. The value is the licensee's account ID. Requires an active connection between that account and yours.

Pattern: ^acct_[0-9a-hjkmnp-tv-z]{26}$
Idempotency-Key
string

A unique key for this operation, up to 255 characters. In test mode, POST keys are scoped to your account and mode and bind the endpoint and body for 24 hours. A different endpoint or body with the same key is refused.

Initial live check and generation creation require a nonempty key. Each operation has a separate account-scoped namespace; retain the same API key, body and idempotency key for retries within 24 hours of creation. A pending check returns 202 with status: "checking". Completed checks replay their sealed response; successful generation POSTs replay the original accepted 202, so use GET for current state. Live verification is a read-only query that returns a fresh verification ID on each call, without exact response caching.

The broader delegated-account contract also scopes keys to Reflections-Account; delegated requests and the other planned live POST operations remain unsupported.

Maximum string length: 255

Body

file
file
required

The bytes.

purpose
enum<string>
required

reference and voice_sample: media a model receives. mask: an edit mask. output: something a model made, to submit as a generation.

Available options:
reference,
voice_sample,
mask,
output

Response

The file.

id
string
required

Unique identifier, prefixed file_. Send it as an input's file or an artifact's file.

Pattern: ^file_[0-9a-hjkmnp-tv-z]{26}$
object
string
required

Always file.

Allowed value: "file"
livemode
boolean
required

true in live mode, false in test mode.

purpose
enum<string>
required

What the file is for: media a model receives, or an output to submit.

Available options:
reference,
voice_sample,
mask,
output
status
enum<string>
required

uploading: waiting for the bytes at upload_url. ready: usable in checks and generations. expired: deleted; upload it again.

Available options:
uploading,
ready,
expired
sha256
string
required

SHA-256 of the file's bytes, in hex.

Pattern: ^[0-9a-f]{64}$
media_type
string
required

The file's MIME type.

size
integer
required

Size in bytes.

expires_at
string<date-time>
required

When the file is deleted: 24 hours after it was created, or later while a held generation needs it.

created_at
string<date-time>
required

When the file was created.

width
integer | null

Width in pixels, for images and video. null for other files, and until the bytes arrive.

height
integer | null

Height in pixels, for images and video. null for other files, and until the bytes arrive.

duration_ms
integer | null

Length in milliseconds, for audio and video. null for other files, and until the bytes arrive.

upload_url
string<uri> | null

PUT the bytes here. Present while uploading; expires in 1 hour.