Create assistant file (v1)
POST
https://api.openai.com/v1/assistants/asst_abc123/files
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/assistants/asst_abc123/files' \
--header 'Authorization: Bearer $OPENAI_API_KEY"' \
--header 'OpenAI-Beta: assistants=v1' \
--header 'Content-Type: application/json' \
--data-raw '{
"file_id": "file-abc123"
}'
Response Response Example
{
"id": "file-abc123",
"object": "assistant.file",
"created_at": 1699055364,
"assistant_id": "asst_abc123"
}
Request
Header Params
Authorization
stringΒ
required
Example:
Bearer $OPENAI_API_KEY"
Content-Type
stringΒ
required
Example:
application/json
OpenAI-Beta
stringΒ
required
Example:
assistants=v1
Body Params application/json
Responses
Modified atΒ 2024-12-12 07:59:01