Upload a new file
Upload a file that can be used across various endpoints.
AuthorizationBearer <token>
In: header
Header Parameters
OpenAI-Organization?Openai-Organization
OpenAI-Project?Openai-Project
fileFile
The File object (not file name) to be uploaded.
Format
binarypurposePurpose
The intended purpose of the uploaded file.
Value in
"assistants" | "assistants_output" | "batch" | "batch_output" | "fine-tune" | "fine-tune-results" | "vision" | "user_data" | "evals"Response Body
curl -X POST "https://loading/v1/files" \
-H "OpenAI-Organization: 5eb7cf5a86d9755df3a6c593" \
-H "OpenAI-Project: 5eb7cf5a86d9755df3a6c593" \
-F file="string" \
-F purpose="assistants"{
"id": "5eb7cf5a86d9755df3a6c593",
"project_id": "5eb7cf5a86d9755df3a6c593",
"object": "file",
"bytes": 0,
"filename": "string",
"purpose": "assistants",
"created_at": 0,
"expires_at": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.