Skip to main content
POST
CSharp (SDK)

Authorizations

Authorization
string
header
required

Send Authorization: Bearer , using an MKA1 API key for automation or an OAuth API access token for a signed-in application. Use a dynamic security callback to refresh OAuth access tokens. Browser session-only operations still require their declared cookie.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

multipart/form-data
file
file
required

The file to upload. Multipart file parts must include a nonblank filename; the lowercase WHATWG placeholder filename "blob" is treated as missing.

purpose
enum<string>
required

The intended purpose of the file

Available options:
assistants,
batch,
fine-tune,
vision,
user_data,
evals

Response

200 - application/json

OK

id
string
required

The file identifier

bytes
integer
required

The size of the file in bytes

Required range: -9007199254740991 <= x <= 9007199254740991
created_at
integer
required

Unix timestamp when the file was created

Required range: -9007199254740991 <= x <= 9007199254740991
filename
string
required

The name of the file

purpose
enum<string>
required

The intended purpose of the file

Available options:
assistants,
batch,
fine-tune,
vision,
user_data,
evals
object
any
default:file
expires_at
integer | null

Unix timestamp when the file expires

Required range: -9007199254740991 <= x <= 9007199254740991
status
enum<string>

DEPRECATED: File processing status

Available options:
uploaded,
processed,
error
status_details
string

DEPRECATED: Details about file status

sha256
string | null

SHA-256 of the file's bytes, lowercase hex. Two files with the same value hold the same content; a vector store refuses a second one. Null for files uploaded before hashing, until they are attached to a store or backfilled.

Required string length: 64