Create assistant file (v1)
POST
https://api.openai.com/v1/assistants/asst_abc123/filesRequest
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
file_id
string
required
A File ID (with purpose="assistants"
) that the assistant should use. Useful for tools like retrieval
and code_interpreter
that can access files.
Example
{
"file_id": "file-abc123"
}
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
id
string
required
object
string
required
created_at
integer
required
assistant_id
string
required
Example
{
"id": "file-abc123",
"object": "assistant.file",
"created_at": 1699055364,
"assistant_id": "asst_abc123"
}
Last modified: 2 months ago