Assistants
- GETList assistants
- POSTCreate assistant
- GETRetrieve assistant
- POSTModify assistant
- DELDelete assistant
- POSTCreate thread
- POSTCreate thread and run
- GETRetrieve thread.
- POSTModify thread
- DELDelete thread
- GETList messages
- POSTCreate message
- GETRetrieve message
- POSTModify message
- DELDelete message
- GETList runs
- POSTCreate run
- GETRetrieve run
- POSTModify run
- POSTCancel run
- GETList run steps
- GETRetrieve run step
- POSTThe run step object
Chat
Completions
Embeddings
Evals
Files
Fine-tuning
- GETList checkpoint permissions
- POSTCreate checkpoint permissions
- DELDelete checkpoint permission
- GETList your organization's fine-tuning jobs
- POSTCreate a fine-tuning job
- GETRetrieve fine-tuning job
- POSTImmediately cancel a fine-tune job.
- GETList checkpoints for a fine-tuning job.
- GETGet status updates for a fine-tuning job.
Moderations
API Reference
Audit Logs
Certificates
Usage
Projects
- GETReturns a list of projects.
- POSTCreate project
- GETRetrieves a project.
- POSTModify project
- GETList project API keys
- GETRetrieve project API key
- DELDelete project API key
- POSTArchive project
- GETList project rate limits
- POSTUpdate project rate limit
- GETList project service accounts
- POSTCreate project service account
- GETRetrieve project service account
- DELDelete project service account
- GETReturn project users
- POSTCreate project user
- GETRetrieve project user
- POSTModify project user
- DELDelete project user
Responses
Vector stores
- GETReturns a list of vector stores.
- POSTCreate a vector store.
- GETRetrieves a vector store.
- POSTModifies a vector store.
- DELDelete a vector store.
- POSTCreate a vector store file batch.
- GETRetrieves a vector store file batch.
- POSTCancel vector store file batch
- GETReturns a list of vector store files in a batch.
- GETReturns a list of vector store files.
- POSTCreate vector store file
- GETRetrieves a vector store file.
- POSTUpdate attributes on a vector store file.
- DELDelete vector store file
- GETRetrieve vector store
- POSTSearch vector store
Responses
Create a model response
Creates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model’s response.
POST
/
responses
Copy
Ask AI
curl --request POST \
--url https://api.openai.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"previous_response_id": "<string>",
"model": "gpt-4o",
"reasoning": {
"effort": "medium",
"generate_summary": "auto"
},
"max_output_tokens": 123,
"instructions": "<string>",
"text": {
"format": {
"type": "text"
}
},
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"<string>"
],
"max_num_results": 123,
"filters": {
"type": "eq",
"key": "<string>",
"value": "<string>"
},
"ranking_options": {
"ranker": "auto",
"score_threshold": 0
}
}
],
"tool_choice": "none",
"truncation": "disabled",
"input": "<string>",
"include": [
"file_search_call.results"
],
"parallel_tool_calls": true,
"store": true,
"stream": false
}'
Copy
Ask AI
{
"metadata": {},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"previous_response_id": "<string>",
"model": "gpt-4o",
"reasoning": {
"effort": "medium",
"generate_summary": "auto"
},
"max_output_tokens": 123,
"instructions": "<string>",
"text": {
"format": {
"type": "text"
}
},
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"<string>"
],
"max_num_results": 123,
"filters": {
"type": "eq",
"key": "<string>",
"value": "<string>"
},
"ranking_options": {
"ranker": "auto",
"score_threshold": 0
}
}
],
"tool_choice": "none",
"truncation": "disabled",
"id": "<string>",
"object": "response",
"status": "completed",
"created_at": 123,
"error": {
"code": "server_error",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{
"id": "<string>",
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{
"type": "file_citation",
"index": 123,
"file_id": "<string>"
}
]
}
],
"status": "in_progress"
}
],
"output_text": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"parallel_tool_calls": true
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
OK
The response is of type object
.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.openai.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"previous_response_id": "<string>",
"model": "gpt-4o",
"reasoning": {
"effort": "medium",
"generate_summary": "auto"
},
"max_output_tokens": 123,
"instructions": "<string>",
"text": {
"format": {
"type": "text"
}
},
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"<string>"
],
"max_num_results": 123,
"filters": {
"type": "eq",
"key": "<string>",
"value": "<string>"
},
"ranking_options": {
"ranker": "auto",
"score_threshold": 0
}
}
],
"tool_choice": "none",
"truncation": "disabled",
"input": "<string>",
"include": [
"file_search_call.results"
],
"parallel_tool_calls": true,
"store": true,
"stream": false
}'
Copy
Ask AI
{
"metadata": {},
"temperature": 1,
"top_p": 1,
"user": "user-1234",
"service_tier": "auto",
"previous_response_id": "<string>",
"model": "gpt-4o",
"reasoning": {
"effort": "medium",
"generate_summary": "auto"
},
"max_output_tokens": 123,
"instructions": "<string>",
"text": {
"format": {
"type": "text"
}
},
"tools": [
{
"type": "file_search",
"vector_store_ids": [
"<string>"
],
"max_num_results": 123,
"filters": {
"type": "eq",
"key": "<string>",
"value": "<string>"
},
"ranking_options": {
"ranker": "auto",
"score_threshold": 0
}
}
],
"tool_choice": "none",
"truncation": "disabled",
"id": "<string>",
"object": "response",
"status": "completed",
"created_at": 123,
"error": {
"code": "server_error",
"message": "<string>"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{
"id": "<string>",
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "<string>",
"annotations": [
{
"type": "file_citation",
"index": 123,
"file_id": "<string>"
}
]
}
],
"status": "in_progress"
}
],
"output_text": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"reasoning_tokens": 123
},
"total_tokens": 123
},
"parallel_tool_calls": true
}
Assistant
Responses are generated using AI and may contain mistakes.