Skip to main content
POST
/
assistants
/
{assistant_id}
cURL
curl https://api.portkey.ai/v1/assistants/asst_abc123 \
  -H "Content-Type: application/json" \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
  -H "OpenAI-Beta: assistants=v2" \
  -d '{
      "instructions": "You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.",
      "tools": [{"type": "file_search"}],
      "model": "gpt-4-turbo"
    }'
{
  "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": "none"
}

Authorizations

x-portkey-api-key
string
header
required
x-portkey-virtual-key
string
header
required

Path Parameters

assistant_id
string
required

Body

application/json
model
string
name
string | null
Maximum length: 256
description
string | null
Maximum length: 512
instructions
string | null
Maximum length: 256000
tools
(Code interpreter tool · object | FileSearch tool · object | Function tool · object)[]
Maximum length: 128
  • Code interpreter tool
  • FileSearch tool
  • Function tool
tool_resources
object | null
metadata
object | null
temperature
number | null
default:1
Required range: 0 <= x <= 2
Example:
top_p
number | null
default:1
Required range: 0 <= x <= 1
Example:
response_format
Available options:
none,
auto

Response

200 - application/json
id
string
required
object
enum<string>
required
Available options:
assistant
created_at
integer
required
name
string | null
required
Maximum length: 256
description
string | null
required
Maximum length: 512
model
string
required
instructions
string | null
required
Maximum length: 256000
tools
(Code interpreter tool · object | FileSearch tool · object | Function tool · object)[]
required
Maximum length: 128
  • Code interpreter tool
  • FileSearch tool
  • Function tool
metadata
object | null
required
tool_resources
object | null
temperature
number | null
default:1
Required range: 0 <= x <= 2
Example:
top_p
number | null
default:1
Required range: 0 <= x <= 1
Example:
response_format
Available options:
none,
auto