header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
Example
{"instructions":"You are a personal math tutor. When asked a question, write and run Python code to answer the question.","name":"Math Tutor""tools":[{"type":"code_interpreter"}],"model":"gpt-4"}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST '/v1/assistants' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data-raw'{
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
"name": "Math Tutor"
"tools": [{"type": "code_interpreter"}],
"model": "gpt-4"
}'
Responses
🟢200Success
application/json
Body
Example
{"id":"asst_abc123","object":"assistant","created_at":1698984975,"name":"Math Tutor","description":null,"model":"gpt-4","instructions":"You are a personal math tutor. When asked a question, write and run Python code to answer the question.","tools":[{"type":"code_interpreter"}],"file_ids":[],"metadata":{}}