POST
/
assistants
curl --request POST \
  --url https://api.openai.com/v1/assistants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-4o",
  "name": "<string>",
  "description": "<string>",
  "instructions": "<string>",
  "reasoning_effort": "medium",
  "tools": [],
  "tool_resources": {
    "code_interpreter": {
      "file_ids": []
    },
    "file_search": {
      "vector_store_ids": [
        "<string>"
      ],
      "vector_stores": [
        {
          "file_ids": [
            "<string>"
          ],
          "chunking_strategy": {
            "type": "auto"
          },
          "metadata": {}
        }
      ]
    }
  },
  "metadata": {},
  "temperature": 1,
  "top_p": 1,
  "response_format": "auto"
}'
{
  "id": "<string>",
  "object": "assistant",
  "created_at": 123,
  "name": "<string>",
  "description": "<string>",
  "model": "<string>",
  "instructions": "<string>",
  "tools": [],
  "tool_resources": {
    "code_interpreter": {
      "file_ids": []
    },
    "file_search": {
      "vector_store_ids": [
        "<string>"
      ]
    }
  },
  "metadata": {},
  "temperature": 1,
  "top_p": 1,
  "response_format": "auto"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200 - application/json

OK

Represents an assistant that can call the model and use tools.