OpenAI Chat Completions API is one of 62 APIs that OpenAI publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
This API exposes 2 JSON Schema definitions.
Tagged areas include Chat Completions. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a JSON-LD context, and 2 JSON Schemas.
This API exposes
6 operations
across 3 paths,
and defines 79 schemas.
It is described by OpenAPI 3.2.0, at version 2.3.0.
Requests are made against a single base URL, https://api.openai.com/v1.
The identity and technical contract details declared by the specification.
ResponseFormatText
object
Default response format. Used to generate text responses.
1 property
1 required
ChatCompletionDeleted
object
3 properties
3 required
ChatCompletionRequestMessage
ParallelToolCalls
boolean
Whether to enable [parallel function calling](https://developers.openai.com/api/docs/guides/function-callingparallel-function-calling) during tool use.
WebSearchContextSize
string
High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.
ChatCompletionTool
object
A function tool that can be used to generate a response.
2 properties
2 required
StopConfiguration
Not supported with latest reasoning models o3 and o4-mini. Up to 4 sequences where the API will stop generating further tokens. The returned text will not cont…
ChatCompletionMessageToolCalls
array
The tool calls generated by the model, such as function calls.
PredictionContent
object
Static predicted output content, such as the content of a text file that is being regenerated.
2 properties
2 required
ModerationInputType
string
FunctionObject
object
4 properties
1 required
ChatCompletionToolChoiceOption
Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick…
PromptCacheTTLEnum
string
ChatCompletionRequestUserMessageContentPart
ChatCompletionRequestMessageContentPartFile
object
Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text generation.
3 properties
2 required
ErrorResponse
object
1 property
1 required
ChatCompletionStreamOptions
ChatCompletionAllowedToolsChoice
object
Constrains the tools available to the model to a pre-defined set.
2 properties
2 required
ChatCompletionRequestFunctionMessage
object
3 properties
3 required
ChatCompletionRequestSystemMessageContentPart
ChatCompletionRequestMessageContentPartImage
object
Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).
3 properties
2 required
VoiceIdsOrCustomVoice
A built-in voice name or a custom voice reference.
ChatCompletionStreamResponseDelta
object
A chat completion delta generated by streamed model responses.
5 properties
ChatCompletionRequestDeveloperMessage
object
Developer-provided instructions that the model should follow, regardless of messages sent by the user. With o1 models and newer, developer messages replace the…
3 properties
2 required
ChatCompletionMessageToolCall
object
A call to a function tool created by the model.
3 properties
3 required
ChatCompletionMessageList
object
An object representing a list of chat completion messages.
5 properties
5 required
WebSearchLocation
object
Approximate location parameters for the search.
4 properties
MisalignmentErrorDetailsResource
object
3 properties
FunctionParameters
object
The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://developers.openai.com/api/docs/guides/function-calling) for ex…
ChatCompletionRequestMessageContentPartRefusal
object
2 properties
2 required
ChatCompletionModerationResults
object
Successful moderation results for the request input or generated output.
3 properties
3 required
ModerationPolicyParam
object
The policy to apply to moderated response input and output.
2 properties
ChatCompletionFunctions
object
3 properties
1 required
ResponseFormatJsonSchema
object
JSON Schema response format. Used to generate structured JSON responses. Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/st…
2 properties
2 required
ChatCompletionAllowedTools
object
Constrains the tools available to the model to a pre-defined set.
2 properties
2 required
CreateChatCompletionRequest
_MisalignmentSteer
object
1 property
1 required
CreateChatCompletionResponse
object
Represents a chat completion response returned by model, based on the provided input.
10 properties
5 required
ChatCompletionRequestToolMessageContentPart
ChatCompletionMessageCustomToolCall
object
A call to a custom tool created by the model.
3 properties
3 required
ModelResponseProperties
object
8 properties
ChatCompletionRequestMessageContentPartText
object
Learn about [text inputs](https://developers.openai.com/api/docs/guides/text).
3 properties
2 required
ChatCompletionRequestMessageContentPartAudio
object
Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio).
3 properties
2 required
ChatCompletionModerationError
object
An error produced while attempting moderation.
3 properties
3 required
CreateModelResponseProperties
ChatCompletionNamedToolChoice
object
Specifies a tool the model should use. Use to force the model to call a specific function.
2 properties
2 required
ChatCompletionFunctionCallOption
object
Specifying a particular function via {"name": "myfunction"} forces the model to call that function.
1 property
1 required
ModerationConfigParam
object
The moderation policy for the response input.
1 property
1 required
ChatCompletionModeration
object
Moderation results or errors for the request input and generated output.
2 properties
2 required
PromptCacheBreakpointParam
object
Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's promptcacheoptions.ttl; the boundary is not rounded to a to…
1 property
1 required
Error
object
5 properties
4 required
ChatCompletionRequestUserMessage
object
Messages sent by an end user, containing prompts or additional context information.
3 properties
2 required
CreateChatCompletionStreamResponse
object
Represents a streamed chunk of a chat completion response returned by the model, based on the provided input. [Learn more](https://developers.openai.com/api/do…
10 properties
5 required
ResponseFormatJsonSchemaSchema
object
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas [here](https://json-schema.org/).
ChatCompletionMessageToolCallChunk
object
4 properties
1 required
PromptCacheModeEnum
string
ChatCompletionList
object
An object representing a list of Chat Completions.
5 properties
5 required
CustomToolChatCompletions
object
A custom tool that processes input using a specified format.
2 properties
2 required
CompletionUsage
object
Usage statistics for the completion request.
5 properties
3 required
ResponseFormatJsonObject
object
JSON object response format. An older method of generating JSON responses. Using jsonschema is recommended for models that support it. Note that the model will…
1 property
1 required
ChatCompletionRequestAssistantMessageContentPart
PromptCacheOptionsParam
object
Options for prompt caching. Supported for gpt-5.6 and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explici…
2 properties
ModerationParam
object
Configuration for running moderation on the input and output of this response.
2 properties
1 required
ChatCompletionResponseMessage
object
A chat completion message generated by the model.
7 properties
3 required
ChatCompletionRequestAssistantMessage
object
Messages sent by the model in response to user messages.
7 properties
1 required
ChatCompletionRequestSystemMessage
object
Developer-provided instructions that the model should follow, regardless of messages sent by the user. With o1 models and newer, use developer messages for thi…
3 properties
2 required
ChatCompletionRequestToolMessage
object
3 properties
3 required
ChatCompletionTokenLogprob
object
4 properties
4 required
ChatCompletionNamedToolChoiceCustom
object
Specifies a tool the model should use. Use to force the model to call a specific custom tool.
2 properties
2 required
ModerationResultBody
object
A moderation result produced for the response input or output.
6 properties
6 required
The full machine-readable OpenAPI contract behind this narrative.
Other APIs OpenAI publishes across the network.