Version 1
Connector Overview: This page documents all 110 actions for the Openaiconnector v1.
Assistants (23)
POST Cancels a run that is `in_progress`.
/threads/{thread_id}/runs/{run_id}/cancel
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to which this run belongs. |
|
|
The ID of the run to cancel. |
|
|
N/A |
POST Create a message.
/threads/{thread_id}/messages
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to create a message for. |
|
|
N/A |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
The role of the entity that is creating the message. Allowed values include:
|
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
POST Create a run.
/threads/{thread_id}/runs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to run. |
|
|
A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[].file_search.results[].content to fetch the file search result content. See the file search tool documentation for more information. |
|
|
N/A |
Options (11)
|
Option Name |
Description |
|---|---|
|
|
The ID of the assistant to use to execute this run. |
|
|
Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis. |
|
|
Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. |
|
|
Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. |
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
|
|
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
|
|
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. |
|
|
If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message. |
|
|
The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info. |
|
|
The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info. |
|
|
Whether to enable parallel function calling during tool use. |
POST Create a thread and run it in one request.
/threads/runs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (10)
|
Option Name |
Description |
|---|---|
|
|
The ID of the assistant to use to execute this run. |
|
|
Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. |
|
|
Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. |
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
|
|
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
|
|
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. |
|
|
If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message. |
|
|
The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info. |
|
|
The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info. |
|
|
Whether to enable parallel function calling during tool use. |
POST Create a thread.
/threads
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
POST Create an assistant with a model and instructions.
/assistants
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (7)
|
Option Name |
Description |
|---|---|
|
|
The name of the assistant. The maximum length is 256 characters. |
|
|
The description of the assistant. The maximum length is 512 characters. |
|
|
The system instructions that the assistant uses. The maximum length is 256,000 characters. |
|
|
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, file_search, or function. |
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
|
|
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
|
|
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. |
DELETE Delete a thread.
/threads/{thread_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to delete. |
|
|
N/A |
DELETE Delete an assistant.
/assistants/{assistant_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the assistant to delete. |
|
|
N/A |
DELETE Deletes a message.
/threads/{thread_id}/messages/{message_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to which this message belongs. |
|
|
The ID of the message to delete. |
|
|
N/A |
POST Modifies a message.
/threads/{thread_id}/messages/{message_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to which this message belongs. |
|
|
The ID of the message to modify. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
POST Modifies a run.
/threads/{thread_id}/runs/{run_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread that was run. |
|
|
The ID of the run to modify. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
POST Modifies a thread.
/threads/{thread_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to modify. Only the metadata can be modified. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
POST Modifies an assistant.
/assistants/{assistant_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the assistant to modify. |
|
|
N/A |
Options (7)
|
Option Name |
Description |
|---|---|
|
|
The name of the assistant. The maximum length is 256 characters. |
|
|
The description of the assistant. The maximum length is 512 characters. |
|
|
The system instructions that the assistant uses. The maximum length is 256,000 characters. |
|
|
A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types code_interpreter, file_search, or function. |
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
|
|
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
|
|
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. |
GET Retrieve a message.
/threads/{thread_id}/messages/{message_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to which this message belongs. |
|
|
The ID of the message to retrieve. |
|
|
N/A |
GET Retrieves a run step.
/threads/{thread_id}/runs/{run_id}/steps/{step_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to which the run and run step belongs. |
|
|
The ID of the run to which the run step belongs. |
|
|
The ID of the run step to retrieve. |
|
|
A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[].file_search.results[].content to fetch the file search result content. See the file search tool documentation for more information. |
|
|
N/A |
GET Retrieves a run.
/threads/{thread_id}/runs/{run_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread that was run. |
|
|
The ID of the run to retrieve. |
|
|
N/A |
GET Retrieves a thread.
/threads/{thread_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to retrieve. |
|
|
N/A |
GET Retrieves an assistant.
/assistants/{assistant_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the assistant to retrieve. |
|
|
N/A |
GET Returns a list of assistants.
/assistants
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
N/A |
GET Returns a list of messages for a given thread.
/threads/{thread_id}/messages
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread the messages belong to. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
Filter messages by the run ID that generated them. |
|
|
N/A |
GET Returns a list of run steps belonging to a run.
/threads/{thread_id}/runs/{run_id}/steps
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread the run and run steps belong to. |
|
|
The ID of the run the run steps belong to. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[].file_search.results[].content to fetch the file search result content. See the file search tool documentation for more information. |
|
|
N/A |
GET Returns a list of runs belonging to a thread.
/threads/{thread_id}/runs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread the run belongs to. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
N/A |
POST When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
/threads/{thread_id}/runs/{run_id}/submit_tool_outputs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the thread to which this run belongs. |
|
|
The ID of the run that requires the tool output submission. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
If true, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a data: [DONE] message. |
Audio (3)
POST Generates audio from the input text.
/audio/speech
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (4)
|
Option Name |
Description |
|---|---|
|
|
The text to generate audio for. The maximum length is 4096 characters. |
|
|
The voice to use when generating the audio. Supported voices are alloy, echo, fable, onyx, nova, and shimmer. Previews of the voices are available in the Text to speech guide. |
|
|
The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm. |
|
|
The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default. |
POST Transcribes audio into the input language.
/audio/transcriptions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (6)
|
Option Name |
Description |
|---|---|
|
|
The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. |
|
|
The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. |
|
|
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. |
|
|
The format of the output, in one of these options: json, text, srt, verbose_json, or vtt. |
|
|
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. |
|
|
The timestamp granularities to populate for this transcription. response_format must be set verbose_json to use timestamp granularities. Either or both of these options are supported: word, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. |
POST Translates audio into English.
/audio/translations
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (4)
|
Option Name |
Description |
|---|---|
|
|
The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. |
|
|
An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English. |
|
|
The format of the output, in one of these options: json, text, srt, verbose_json, or vtt. |
|
|
The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. |
Audit Logs
GET List user actions and configuration changes within this organization.
/organization/audit_logs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Return only events whose effective_at (Unix seconds) is in this range. |
|
|
Return only events for these projects. |
|
|
Return only events with a type in one of these values. For example, project.created. For all options, see the documentation for the audit log object. |
|
|
Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID. |
|
|
Return only events performed by users with these emails. |
|
|
Return only events performed on these targets. For example, a project ID updated. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
N/A |
Batch (4)
POST Cancels an in-progress batch. The batch will be in status `cancelling` for up to 10 minutes, before changing to `cancelled`, where it will have partial results (if any) available in the output file.
/batches/{batch_id}/cancel
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the batch to cancel. |
|
|
N/A |
POST Creates and executes a batch from an uploaded file of requests
/batches
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (3)
|
Option Name |
Description |
|---|---|
|
|
The ID of an uploaded file that contains requests for the new batch. See upload file (/docs/api-reference/files/create) for how to upload a file. Your input file must be formatted as a JSONL file (/docs/api-reference/batch/request-input), and must be uploaded with the purpose batch. The file can contain up to 50,000 requests, and can be up to 200 MB in size. |
|
|
The endpoint to be used for all requests in the batch. Currently /v1/chat/completions, /v1/embeddings, and /v1/completions are supported. Note that /v1/embeddings batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch. |
|
|
The time frame within which the batch should be processed. Currently only 24h is supported. |
GET List your organization's batches.
/batches
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
N/A |
GET Retrieves a batch.
/batches/{batch_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the batch to retrieve. |
|
|
N/A |
Chat
POST Creates a model response for the given chat conversation. Learn more in the [text generation](/docs/guides/text-generation), [vision](/docs/guides/vision), and [audio](/docs/guides/audio) guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, [refer to the reasoning guide](/docs/guides/reasoning).
/chat/completions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (18)
|
Option Name |
Description |
|---|---|
|
|
A list of messages comprising the conversation so far. Depending on the
|
|
|
Whether or not to store the output of this chat completion request for
|
|
|
o1 models only Constrains effort on reasoning for
|
|
|
Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
|
Whether to return log probabilities of the output tokens or not. If true,
|
|
|
An integer between 0 and 20 specifying the number of most likely tokens to
|
|
|
The maximum number of tokens (/tokenizer) that can be generated in the
This value is now deprecated in favor of max_completion_tokens, and is
|
|
|
An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. |
|
|
How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. |
|
|
Output types that you would like the model to generate for this request.
["text"] The gpt-4o-audio-preview model can also be used to generate audio. To
["text", "audio"] |
|
|
Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
|
This feature is in Beta.
|
|
|
Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:
When this parameter is set, the response body will include the service_tier utilized. |
|
|
If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a data: [DONE] message. Example Python code (https://cookbook.openai.com/examples/how_to_stream_completions). |
|
|
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
|
|
|
An alternative to sampling with temperature, called nucleus sampling,
We generally recommend altering this or temperature but not both. |
|
|
Whether to enable parallel function calling during tool use. |
|
|
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
Completions
POST Creates a completion for the provided prompt and parameters.
/completions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (13)
|
Option Name |
Description |
|---|---|
|
|
Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed. When used with n, best_of controls the number of candidate completions and n specifies how many to return – best_of must be greater than n. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop. |
|
|
Echo back the prompt in addition to the completion |
|
|
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. See more information about frequency and presence penalties. |
|
|
Include the log probabilities on the logprobs most likely output tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 5. |
|
|
The maximum number of tokens (/tokenizer) that can be generated in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. Example Python code (https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. |
|
|
How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop. |
|
|
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. See more information about frequency and presence penalties. |
|
|
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend. |
|
|
Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a data: [DONE] message. Example Python code (https://cookbook.openai.com/examples/how_to_stream_completions). |
|
|
The suffix that comes after a completion of inserted text. This parameter is only supported for gpt-3.5-turbo-instruct. |
|
|
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. |
|
|
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. |
|
|
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
General (4)
POST Create an organization admin API key
/organization/admin_api_keys
Create a new admin-level API key for the organization.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
N/A |
DELETE Delete an organization admin API key
/organization/admin_api_keys/{key_id}
Delete the specified admin API key.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the API key to be deleted. |
|
|
N/A |
GET List organization API keys
/organization/admin_api_keys
Retrieve a paginated list of organization admin API keys.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Return keys with IDs that come after this ID in the pagination order. |
|
|
Order results by creation time, ascending or descending. |
|
|
Maximum number of keys to return. |
|
|
N/A |
GET Retrieve a single organization API key
/organization/admin_api_keys/{key_id}
Get details for a specific organization API key by its ID.
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the API key. |
|
|
N/A |
Embeddings
POST Creates an embedding vector representing the input text.
/embeddings
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (3)
|
Option Name |
Description |
|---|---|
|
|
The format to return the embeddings in. Can be either float or base64. |
|
|
The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. |
|
|
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
Files (5)
DELETE Delete a file.
/files/{file_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the file to use for this request. |
|
|
N/A |
GET Returns a list of files.
/files
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Only return files with the given purpose. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
N/A |
GET Returns information about a specific file.
/files/{file_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the file to use for this request. |
|
|
N/A |
GET Returns the contents of the specified file.
/files/{file_id}/content
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the file to use for this request. |
|
|
N/A |
POST Upload a file that can be used across various endpoints. Individual files can be up to 512 MB, and the size of all files uploaded by one organization can be up to 100 GB. The Assistants API supports files up to 2 million tokens and of specific file types. See the [Assistants Tools guide](/docs/assistants/tools) for details. The Fine-tuning API only supports `.jsonl` files. The input also has certain required formats for fine-tuning [chat](/docs/api-reference/fine-tuning/chat-input) or [completions](/docs/api-reference/fine-tuning/completions-input) models. The Batch API only supports `.jsonl` files up to 200 MB in size. The input also has a specific required [format](/docs/api-reference/batch/request-input). Please [contact us](https://help.openai.com/) if you need to increase these storage limits.
/files
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
The File object (not file name) to be uploaded. |
|
|
The intended purpose of the uploaded file. Use "assistants" for Assistants (/docs/api-reference/assistants) and Message (/docs/api-reference/messages) files, "vision" for Assistants image file inputs, "batch" for Batch API (/docs/guides/batch), and "fine-tune" for Fine-tuning (/docs/api-reference/fine-tuning). |
Fine-tuning (6)
POST Creates a fine-tuning job which begins the process of creating a new model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about fine-tuning](/docs/guides/fine-tuning)
/fine_tuning/jobs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (4)
|
Option Name |
Description |
|---|---|
|
|
The ID of an uploaded file that contains training data. See upload file (/docs/api-reference/files/create) for how to upload a file. Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose fine-tune. The contents of the file should differ depending on if the model uses the chat (/docs/api-reference/fine-tuning/chat-input), completions (/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the preference (/docs/api-reference/fine-tuning/preference-input) format. See the fine-tuning guide (/docs/guides/fine-tuning) for more details. |
|
|
A string of up to 64 characters that will be added to your fine-tuned model name. For example, a suffix of "custom-model-name" would produce a model name like ft:gpt-4o-mini:openai:custom-model-name:7p4lURel. |
|
|
The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation
Your dataset must be formatted as a JSONL file. You must upload your file with the purpose fine-tune. See the fine-tuning guide for more details. |
|
|
The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.
|
GET Get info about a fine-tuning job. [Learn more about fine-tuning](/docs/guides/fine-tuning)
/fine_tuning/jobs/{fine_tuning_job_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the fine-tuning job. |
|
|
N/A |
GET Get status updates for a fine-tuning job.
/fine_tuning/jobs/{fine_tuning_job_id}/events
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the fine-tuning job to get events for. |
|
|
Identifier for the last event from the previous pagination request. |
|
|
Number of events to retrieve. |
|
|
N/A |
POST Immediately cancel a fine-tune job.
/fine_tuning/jobs/{fine_tuning_job_id}/cancel
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the fine-tuning job to cancel. |
|
|
N/A |
GET List checkpoints for a fine-tuning job.
/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the fine-tuning job to get checkpoints for. |
|
|
Identifier for the last checkpoint ID from the previous pagination request. |
|
|
Number of checkpoints to retrieve. |
|
|
N/A |
GET List your organization's fine-tuning jobs
/fine_tuning/jobs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Identifier for the last job from the previous pagination request. |
|
|
Number of fine-tuning jobs to retrieve. |
|
|
N/A |
Images (3)
POST Creates a variation of a given image.
/images/variations
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (5)
|
Option Name |
Description |
|---|---|
|
|
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. |
|
|
The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported. |
|
|
The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. |
|
|
The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. |
|
|
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
POST Creates an edited or extended image given an original image and a prompt.
/images/edits
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (7)
|
Option Name |
Description |
|---|---|
|
|
The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask. |
|
|
A text description of the desired image(s). The maximum length is 1000 characters. |
|
|
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image. |
|
|
The number of images to generate. Must be between 1 and 10. |
|
|
The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. |
|
|
The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. |
|
|
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
POST Creates an image given a prompt.
/images/generations
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (7)
|
Option Name |
Description |
|---|---|
|
|
A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3. |
|
|
The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported. |
|
|
The quality of the image that will be generated. hd creates images with finer details and greater consistency across the image. This param is only supported for dall-e-3. |
|
|
The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. |
|
|
The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 for dall-e-2. Must be one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3 models. |
|
|
The style of the generated images. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for dall-e-3. |
|
|
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. |
Invites (4)
POST Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
/organization/invites
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
Send an email to this address |
|
|
owner or reader |
DELETE Delete an invite. If the invite has already been accepted, it cannot be deleted.
/organization/invites/{invite_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the invite to delete. |
|
|
N/A |
GET Retrieves an invite.
/organization/invites/{invite_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the invite to retrieve. |
|
|
N/A |
GET Returns a list of invites in the organization.
/organization/invites
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
N/A |
Models (3)
DELETE Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
/models/{model}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The model to delete |
|
|
N/A |
GET Lists the currently available models, and provides basic information about each one such as the owner and availability.
/models
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
GET Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
/models/{model}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the model to use for this request |
|
|
N/A |
Moderations
POST Classifies if text and/or image inputs are potentially harmful. Learn more in the [moderation guide](/docs/guides/moderation).
/moderations
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Projects (19)
POST Adds a user to the project. Users must already be members of the organization to be added to a project.
/organization/projects/{project_id}/users
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
N/A |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
The ID of the user. |
|
|
owner or member |
POST Archives a project in the organization. Archived projects cannot be used or updated.
/organization/projects/{project_id}/archive
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
N/A |
POST Create a new project in the organization. Projects can be created and archived, but cannot be deleted.
/organization/projects
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
The friendly name of the project, this name appears in reports. |
POST Creates a new service account in the project. This also returns an unredacted API key for the service account.
/organization/projects/{project_id}/service_accounts
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
The name of the service account being created. |
DELETE Deletes a service account from the project.
/organization/projects/{project_id}/service_accounts/{service_account_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the service account. |
|
|
N/A |
DELETE Deletes a user from the project.
/organization/projects/{project_id}/users/{user_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the user. |
|
|
N/A |
DELETE Deletes an API key from the project.
/organization/projects/{project_id}/api_keys/{key_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the API key. |
|
|
N/A |
POST Modifies a project in the organization.
/organization/projects/{project_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
The updated name of the project, this name appears in reports. |
POST Modifies a user's role in the project.
/organization/projects/{project_id}/users/{user_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the user. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
owner or member |
GET Retrieves a project.
/organization/projects/{project_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
N/A |
GET Retrieves a service account in the project.
/organization/projects/{project_id}/service_accounts/{service_account_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the service account. |
|
|
N/A |
GET Retrieves a user in the project.
/organization/projects/{project_id}/users/{user_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the user. |
|
|
N/A |
GET Retrieves an API key in the project.
/organization/projects/{project_id}/api_keys/{key_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the API key. |
|
|
N/A |
GET Returns a list of API keys in the project.
/organization/projects/{project_id}/api_keys
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
N/A |
GET Returns a list of projects.
/organization/projects
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
If true returns all projects including those that have been archived. Archived projects are not included by default. |
|
|
N/A |
GET Returns a list of service accounts in the project.
/organization/projects/{project_id}/service_accounts
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
N/A |
GET Returns a list of users in the project.
/organization/projects/{project_id}/users
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
N/A |
GET Returns the rate limits per model for a project.
/organization/projects/{project_id}/rate_limits
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
A limit on the number of objects to be returned. The default is 100. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, beginning with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
N/A |
POST Updates a project rate limit.
/organization/projects/{project_id}/rate_limits/{rate_limit_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the project. |
|
|
The ID of the rate limit. |
|
|
N/A |
Options (6)
|
Option Name |
Description |
|---|---|
|
|
The maximum requests per minute. |
|
|
The maximum tokens per minute. |
|
|
The maximum images per minute. Only relevant for certain models. |
|
|
The maximum audio megabytes per minute. Only relevant for certain models. |
|
|
The maximum requests per day. Only relevant for certain models. |
|
|
The maximum batch input tokens per day. Only relevant for certain models. |
Realtime
POST Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the `session.update` client event. It responds with a session object, plus a `client_secret` key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.
/realtime/sessions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (8)
|
Option Name |
Description |
|---|---|
|
|
The set of modalities the model can respond with. To disable audio,
|
|
|
The Realtime model used for this session. |
|
|
The default system instructions (i.e. system message) prepended to model
Note that the server sets default instructions which will be used if this
|
|
|
The voice the model uses to respond. Voice cannot be changed during the
|
|
|
The format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. |
|
|
The format of output audio. Options are pcm16, g711_ulaw, or g711_alaw. |
|
|
How the model chooses tools. Options are auto, none, required, or
|
|
|
Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. |
Uploads (4)
POST Adds a [Part](/docs/api-reference/uploads/part-object) to an [Upload](/docs/api-reference/uploads/object) object. A Part represents a chunk of bytes from the file you are trying to upload. Each Part can be at most 64 MB, and you can add Parts until you hit the Upload maximum of 8 GB. It is possible to add multiple Parts in parallel. You can decide the intended order of the Parts when you [complete the Upload](/docs/api-reference/uploads/complete).
/uploads/{upload_id}/parts
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the Upload. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
The chunk of bytes for this Part. |
POST Cancels the Upload. No Parts may be added after an Upload is cancelled.
/uploads/{upload_id}/cancel
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the Upload. |
|
|
N/A |
POST Completes the [Upload](/docs/api-reference/uploads/object). Within the returned Upload object, there is a nested [File](/docs/api-reference/files/object) object that is ready to use in the rest of the platform. You can specify the order of the Parts by passing in an ordered list of the Part IDs. The number of bytes uploaded upon completion must match the number of bytes initially specified when creating the Upload object. No Parts may be added after an Upload is completed.
/uploads/{upload_id}/complete
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the Upload. |
|
|
N/A |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
The ordered list of Part IDs. |
|
|
The optional md5 checksum for the file contents to verify if the bytes uploaded matches what you expect. |
POST Creates an intermediate [Upload](/docs/api-reference/uploads/object) object that you can add [Parts](/docs/api-reference/uploads/part-object) to. Currently, an Upload can accept at most 8 GB in total and expires after an hour after you create it. Once you complete the Upload, we will create a [File](/docs/api-reference/files/object) object that contains all the parts you uploaded. This File is usable in the rest of our platform as a regular File object. For certain `purpose`s, the correct `mime_type` must be specified. Please refer to documentation for the supported MIME types for your use case: - [Assistants](/docs/assistants/tools/file-search#supported-files) For guidance on the proper filename extensions for each purpose, please follow the documentation on [creating a File](/docs/api-reference/files/create).
/uploads
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (4)
|
Option Name |
Description |
|---|---|
|
|
The name of the file to upload. |
|
|
The intended purpose of the uploaded file. See the documentation on File purposes. |
|
|
The number of bytes in the file you are uploading. |
|
|
The MIME type of the file. This must fall within the supported MIME types for your file purpose. See the supported MIME types for assistants and vision. |
Usage (9)
GET Get audio speeches usage details for the organization.
/organization/usage/audio_speeches
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Return only usage for these users. |
|
|
Return only usage for these API keys. |
|
|
Return only usage for these models. |
|
|
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get audio transcriptions usage details for the organization.
/organization/usage/audio_transcriptions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Return only usage for these users. |
|
|
Return only usage for these API keys. |
|
|
Return only usage for these models. |
|
|
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get code interpreter sessions usage details for the organization.
/organization/usage/code_interpreter_sessions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Group the usage data by the specified fields. Support fields include project_id. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get completions usage details for the organization.
/organization/usage/completions
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Return only usage for these users. |
|
|
Return only usage for these API keys. |
|
|
Return only usage for these models. |
|
|
If true, return batch jobs only. If false, return non-batch jobs only. By default, return both. |
|
|
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model, batch or any combination of them. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get costs details for the organization.
/organization/costs
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently only 1d is supported, default to 1d. |
|
|
Return only costs for these projects. |
|
|
Group the costs by the specified fields. Support fields include project_id, line_item and any combination of them. |
|
|
A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7. |
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get embeddings usage details for the organization.
/organization/usage/embeddings
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Return only usage for these users. |
|
|
Return only usage for these API keys. |
|
|
Return only usage for these models. |
|
|
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get images usage details for the organization.
/organization/usage/images
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usages for these sources. Possible values are image.generation, image.edit, image.variation or any combination of them. |
|
|
Return only usages for these image sizes. Possible values are 256x256, 512x512, 1024x1024, 1792x1792, 1024x1792 or any combination of them. |
|
|
Return only usage for these projects. |
|
|
Return only usage for these users. |
|
|
Return only usage for these API keys. |
|
|
Return only usage for these models. |
|
|
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model, size, source or any combination of them. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get moderations usage details for the organization.
/organization/usage/moderations
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Return only usage for these users. |
|
|
Return only usage for these API keys. |
|
|
Return only usage for these models. |
|
|
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
GET Get vector stores usage details for the organization.
/organization/usage/vector_stores
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
Start time (Unix seconds) of the query time range, inclusive. |
|
|
End time (Unix seconds) of the query time range, exclusive. |
|
|
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d. |
|
|
Return only usage for these projects. |
|
|
Group the usage data by the specified fields. Support fields include project_id. |
|
|
Specifies the number of buckets to return.
|
|
|
A cursor for use in pagination. Corresponding to the next_page field from the previous response. |
|
|
N/A |
Users (4)
DELETE Deletes a user from the organization.
/organization/users/{user_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the user. |
|
|
N/A |
GET Lists all of the users in the organization.
/organization/users
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
N/A |
POST Modifies a user's role in the organization.
/organization/users/{user_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the user. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
owner or reader |
GET Retrieves a user by their identifier.
/organization/users/{user_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the user. |
|
|
N/A |
Vector stores (13)
POST Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store that the file batch belongs to. |
|
|
The ID of the file batch to cancel. |
|
|
N/A |
POST Create a vector store file batch.
/vector_stores/{vector_store_id}/file_batches
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store for which to create a File Batch. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
A list of File IDs that the vector store should use. Useful for tools like file_search that can access files. |
POST Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).
/vector_stores/{vector_store_id}/files
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store for which to create a File. |
|
|
N/A |
Options (1)
|
Option Name |
Description |
|---|---|
|
|
A File ID that the vector store should use. Useful for tools like file_search that can access files. |
POST Create a vector store.
/vector_stores
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
Options (3)
|
Option Name |
Description |
|---|---|
|
|
A list of File IDs that the vector store should use. Useful for tools like file_search that can access files. |
|
|
The name of the vector store. |
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
DELETE Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.
/vector_stores/{vector_store_id}/files/{file_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store that the file belongs to. |
|
|
The ID of the file to delete. |
|
|
N/A |
DELETE Delete a vector store.
/vector_stores/{vector_store_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store to delete. |
|
|
N/A |
POST Modifies a vector store.
/vector_stores/{vector_store_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store to modify. |
|
|
N/A |
Options (2)
|
Option Name |
Description |
|---|---|
|
|
The name of the vector store. |
|
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. |
GET Retrieves a vector store file batch.
/vector_stores/{vector_store_id}/file_batches/{batch_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store that the file batch belongs to. |
|
|
The ID of the file batch being retrieved. |
|
|
N/A |
GET Retrieves a vector store file.
/vector_stores/{vector_store_id}/files/{file_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store that the file belongs to. |
|
|
The ID of the file being retrieved. |
|
|
N/A |
GET Retrieves a vector store.
/vector_stores/{vector_store_id}
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store to retrieve. |
|
|
N/A |
GET Returns a list of vector store files in a batch.
/vector_stores/{vector_store_id}/file_batches/{batch_id}/files
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store that the files belong to. |
|
|
The ID of the file batch that the files belong to. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
Filter by file status. One of in_progress, completed, failed, cancelled. |
|
|
N/A |
GET Returns a list of vector store files.
/vector_stores/{vector_store_id}/files
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
The ID of the vector store that the files belong to. |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
Filter by file status. One of in_progress, completed, failed, cancelled. |
|
|
N/A |
GET Returns a list of vector stores.
/vector_stores
Parameters
|
Parameter Name |
Description |
|---|---|
|
|
N/A |
|
|
N/A |
|
|
N/A |
|
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
|
|
Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
|
|
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
|
|
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
|
|
N/A |