GET
/v1/schemas/azure/chat/chat%2Fcompletions?kind=output
Accept:
Response body
0 properties · 0 required · 0 $defsThis schema isn’t a plain object with properties — showing the raw JSON instead.
application/json
{
"provider": "azure",
"activity": "chat",
"endpointId": "chat/completions",
"kind": "output",
"contentHash": "ef4bbe4a175f4ddb0e70922a4f10656888a4304856c30eaf529f8df90220c542",
"specRevision": "9fade08c5d30751828e67fecca63b3800567c802d1d6c4c91bba3d193843f7a8",
"provenance": {
"sourceUrl": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/ai/data-plane/OpenAI.v1/azure-v1-v1-generated.json",
"sourceHash": "9fade08c5d30751828e67fecca63b3800567c802d1d6c4c91bba3d193843f7a8",
"fetchedAt": 1791349936,
"extractorVersion": "1",
"derivation": "upstream-spec",
"verifiedAt": null
},
"createdAt": 1791349936,
"supersededAt": null,
"schema": {
"anyOf": [
{
"type": "object",
"required": [
"id",
"choices",
"created",
"model",
"object"
],
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for the chat completion."
},
"choices": {
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.CreateChatCompletionResponseChoices"
},
"description": "A list of chat completion choices. Can be more than one if `n` is greater than 1."
},
"created": {
"type": "integer",
"format": "unixtime",
"description": "The Unix timestamp (in seconds) of when the chat completion was created."
},
"model": {
"type": "string",
"description": "The model used for the chat completion."
},
"system_fingerprint": {
"type": "string",
"description": "This fingerprint represents the backend configuration that the model runs with.\n Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.",
"deprecated": true
},
"object": {
"type": "string",
"enum": [
"chat.completion"
],
"description": "The object type, which is always `chat.completion`.",
"x-stainless-const": true
},
"usage": {
"$ref": "#/$defs/OpenAI.CompletionUsage"
},
"prompt_filter_results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"prompt_index": {
"type": "integer",
"format": "int32",
"description": "The index of the input prompt that this content filter result corresponds to."
},
"content_filter_results": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterResultForPrompt"
}
],
"description": "The content filter results associated with the indexed input prompt."
}
},
"required": [
"prompt_index",
"content_filter_results"
]
}
}
}
},
{
"type": "object",
"required": [
"id",
"choices",
"created",
"model",
"object"
],
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for the chat completion. Each chunk has the same ID."
},
"choices": {
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.CreateChatCompletionStreamResponseChoices"
},
"description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the\n last chunk if you set `stream_options: {\"include_usage\": true}`."
},
"created": {
"type": "integer",
"format": "unixtime",
"description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp."
},
"model": {
"type": "string",
"description": "The model to generate the completion."
},
"system_fingerprint": {
"type": "string",
"description": "This fingerprint represents the backend configuration that the model runs with.\n Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.",
"deprecated": true
},
"object": {
"type": "string",
"enum": [
"chat.completion.chunk"
],
"description": "The object type, which is always `chat.completion.chunk`.",
"x-stainless-const": true
},
"usage": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.CompletionUsage"
}
],
"description": "An optional field that will only be present when you set\n `stream_options: {\"include_usage\": true}` in your request. When present, it\n contains a null value **except for the last chunk** which contains the\n token usage statistics for the entire request.\n*NOTE:** If the stream is interrupted or cancelled, you may not\n receive the final usage chunk which contains the total token usage for\n the request."
},
"delta": {
"$ref": "#/$defs/OpenAI.ChatCompletionStreamResponseDelta"
},
"content_filter_results": {
"$ref": "#/$defs/AzureContentFilterResultForChoice"
}
}
}
],
"$defs": {
"AzureContentFilterBlocklistResult": {
"type": "object",
"required": [
"filtered"
],
"properties": {
"filtered": {
"type": "boolean",
"description": "A value indicating whether any of the detailed blocklists resulted in a filtering action."
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"filtered": {
"type": "boolean",
"description": "A value indicating whether the blocklist produced a filtering action."
},
"id": {
"type": "string",
"description": "The ID of the custom blocklist evaluated."
}
},
"required": [
"filtered",
"id"
]
},
"description": "The pairs of individual blocklist IDs and whether they resulted in a filtering action."
}
},
"description": "A collection of true/false filtering results for configured custom blocklists."
},
"AzureContentFilterCompletionTextSpan": {
"type": "object",
"required": [
"completion_start_offset",
"completion_end_offset"
],
"properties": {
"completion_start_offset": {
"type": "integer",
"format": "int32",
"description": "Offset of the UTF32 code point which begins the span."
},
"completion_end_offset": {
"type": "integer",
"format": "int32",
"description": "Offset of the first UTF32 code point which is excluded from the span. This field is always equal to completion_start_offset for empty spans. This field is always larger than completion_start_offset for non-empty spans."
}
},
"description": "A representation of a span of completion text as used by Azure OpenAI content filter results."
},
"AzureContentFilterCompletionTextSpanDetectionResult": {
"type": "object",
"required": [
"filtered",
"detected",
"details"
],
"properties": {
"filtered": {
"type": "boolean",
"description": "Whether the content detection resulted in a content filtering action."
},
"detected": {
"type": "boolean",
"description": "Whether the labeled content category was detected in the content."
},
"details": {
"type": "array",
"items": {
"$ref": "#/$defs/AzureContentFilterCompletionTextSpan"
},
"description": "Detailed information about the detected completion text spans."
}
}
},
"AzureContentFilterCustomTopicResult": {
"type": "object",
"required": [
"filtered"
],
"properties": {
"filtered": {
"type": "boolean",
"description": "A value indicating whether any of the detailed topics resulted in a filtering action."
},
"details": {
"type": "array",
"items": {
"type": "object",
"properties": {
"detected": {
"type": "boolean",
"description": "A value indicating whether the topic is detected."
},
"id": {
"type": "string",
"description": "The ID of the custom topic evaluated."
}
},
"required": [
"detected",
"id"
]
},
"description": "The pairs of individual topic IDs and whether they are detected."
}
},
"description": "A collection of true/false filtering results for configured custom topics."
},
"AzureContentFilterDetectionResult": {
"type": "object",
"required": [
"filtered",
"detected"
],
"properties": {
"filtered": {
"type": "boolean",
"description": "Whether the content detection resulted in a content filtering action."
},
"detected": {
"type": "boolean",
"description": "Whether the labeled content category was detected in the content."
}
},
"description": "A labeled content filter result item that indicates whether the content was detected and whether the content was\nfiltered."
},
"AzureContentFilterPersonallyIdentifiableInformationResult": {
"type": "object",
"properties": {
"redacted_text": {
"type": "string",
"description": "The redacted text with PII information removed or masked."
},
"sub_categories": {
"type": "array",
"items": {
"$ref": "#/$defs/AzurePiiSubCategoryResult"
},
"description": "Detailed results for individual PIIHarmSubCategory(s)."
}
},
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterDetectionResult"
}
],
"description": "A content filter detection result for Personally Identifiable Information that includes harm extensions."
},
"AzureContentFilterResultForChoice": {
"type": "object",
"properties": {
"sexual": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category for language related to anatomical organs and genitals, romantic relationships, acts\nportrayed in erotic or affectionate terms, pregnancy, physical sexual acts, including those portrayed as an\nassault or a forced sexual violent act against one's will, prostitution, pornography, and abuse."
},
"hate": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category that can refer to any content that attacks or uses pejorative or discriminatory\nlanguage with reference to a person or identity group based on certain differentiating attributes of these groups\nincluding but not limited to race, ethnicity, nationality, gender identity and expression, sexual orientation,\nreligion, immigration status, ability status, personal appearance, and body size."
},
"violence": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category for language related to physical actions intended to hurt, injure, damage, or kill\nsomeone or something; describes weapons, guns and related entities, such as manufactures, associations,\nlegislation, and so on."
},
"self_harm": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category that describes language related to physical actions intended to purposely hurt, injure,\ndamage one's body or kill oneself."
},
"profanity": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterDetectionResult"
}
],
"description": "A detection result that identifies whether crude, vulgar, or otherwise objection language is present in the\ncontent."
},
"custom_blocklists": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterBlocklistResult"
}
],
"description": "A collection of binary filtering outcomes for configured custom blocklists."
},
"custom_topics": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterCustomTopicResult"
}
],
"description": "A collection of binary filtering outcomes for configured custom topics."
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "A distinct, machine-readable code associated with the error."
},
"message": {
"type": "string",
"description": "A human-readable message associated with the error."
}
},
"required": [
"code",
"message"
],
"description": "If present, details about an error that prevented content filtering from completing its evaluation."
},
"protected_material_text": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterDetectionResult"
}
],
"description": "A detection result that describes a match against text protected under copyright or other status."
},
"protected_material_code": {
"type": "object",
"properties": {
"filtered": {
"type": "boolean",
"description": "Whether the content detection resulted in a content filtering action."
},
"detected": {
"type": "boolean",
"description": "Whether the labeled content category was detected in the content."
},
"citation": {
"type": "object",
"properties": {
"license": {
"type": "string",
"description": "The name or identifier of the license associated with the detection."
},
"URL": {
"type": "string",
"format": "uri",
"description": "The URL associated with the license."
}
},
"description": "If available, the citation details describing the associated license and its location."
}
},
"required": [
"filtered",
"detected"
],
"description": "A detection result that describes a match against licensed code or other protected source material."
},
"ungrounded_material": {
"$ref": "#/$defs/AzureContentFilterCompletionTextSpanDetectionResult"
},
"personally_identifiable_information": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterPersonallyIdentifiableInformationResult"
}
],
"description": "A detection result that describes matches against Personal Identifiable Information with configurable subcategories."
}
},
"description": "A content filter result for a single response item produced by a generative AI system."
},
"AzureContentFilterResultForPrompt": {
"type": "object",
"properties": {
"prompt_index": {
"type": "integer",
"format": "int32",
"description": "The index of the input prompt associated with the accompanying content filter result categories."
},
"content_filter_results": {
"type": "object",
"properties": {
"sexual": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category for language related to anatomical organs and genitals, romantic relationships, acts\nportrayed in erotic or affectionate terms, pregnancy, physical sexual acts, including those portrayed as an\nassault or a forced sexual violent act against one's will, prostitution, pornography, and abuse."
},
"hate": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category that can refer to any content that attacks or uses pejorative or discriminatory\nlanguage with reference to a person or identity group based on certain differentiating attributes of these groups\nincluding but not limited to race, ethnicity, nationality, gender identity and expression, sexual orientation,\nreligion, immigration status, ability status, personal appearance, and body size."
},
"violence": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category for language related to physical actions intended to hurt, injure, damage, or kill\nsomeone or something; describes weapons, guns and related entities, such as manufactures, associations,\nlegislation, and so on."
},
"self_harm": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterSeverityResult"
}
],
"description": "A content filter category that describes language related to physical actions intended to purposely hurt, injure,\ndamage one's body or kill oneself."
},
"profanity": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterDetectionResult"
}
],
"description": "A detection result that identifies whether crude, vulgar, or otherwise objection language is present in the\ncontent."
},
"custom_blocklists": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterBlocklistResult"
}
],
"description": "A collection of binary filtering outcomes for configured custom blocklists."
},
"custom_topics": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterCustomTopicResult"
}
],
"description": "A collection of binary filtering outcomes for configured custom topics."
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"description": "A distinct, machine-readable code associated with the error."
},
"message": {
"type": "string",
"description": "A human-readable message associated with the error."
}
},
"required": [
"code",
"message"
],
"description": "If present, details about an error that prevented content filtering from completing its evaluation."
},
"jailbreak": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterDetectionResult"
}
],
"description": "A detection result that describes user prompt injection attacks, where malicious users deliberately exploit\nsystem vulnerabilities to elicit unauthorized behavior from the LLM. This could lead to inappropriate content\ngeneration or violations of system-imposed restrictions."
},
"indirect_attack": {
"allOf": [
{
"$ref": "#/$defs/AzureContentFilterDetectionResult"
}
],
"description": "A detection result that describes attacks on systems powered by Generative AI models that can happen every time\nan application processes information that wasn’t directly authored by either the developer of the application or\nthe user."
}
},
"required": [
"jailbreak",
"indirect_attack"
],
"description": "The content filter category details for the result."
}
},
"description": "A content filter result associated with a single input prompt item into a generative AI system."
},
"AzureContentFilterSeverityResult": {
"type": "object",
"required": [
"filtered",
"severity"
],
"properties": {
"filtered": {
"type": "boolean",
"description": "Whether the content severity resulted in a content filtering action."
},
"severity": {
"type": "string",
"enum": [
"safe",
"low",
"medium",
"high"
],
"description": "The labeled severity of the content."
}
},
"description": "A labeled content filter result item that indicates whether the content was filtered and what the qualitative\nseverity level of the content was, as evaluated against content filter configuration for the category."
},
"AzurePiiSubCategoryResult": {
"type": "object",
"required": [
"sub_category",
"filtered",
"detected",
"redacted"
],
"properties": {
"sub_category": {
"type": "string",
"description": "The PIIHarmSubCategory that was evaluated."
},
"filtered": {
"type": "boolean",
"description": "Whether the content detection resulted in a content filtering action for this subcategory."
},
"detected": {
"type": "boolean",
"description": "Whether the labeled content subcategory was detected in the content."
},
"redacted": {
"type": "boolean",
"description": "Whether the content was redacted for this subcategory."
}
},
"description": "Result details for individual PIIHarmSubCategory(s)."
},
"OpenAI.ChatCompletionMessageCustomToolCall": {
"type": "object",
"required": [
"id",
"type",
"custom"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the tool call."
},
"type": {
"type": "string",
"enum": [
"custom"
],
"description": "The type of the tool. Always `custom`.",
"x-stainless-const": true
},
"custom": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.ChatCompletionMessageCustomToolCallCustom"
}
],
"description": "The custom tool that the model called."
}
},
"description": "A call to a custom tool created by the model.",
"title": "Custom tool call"
},
"OpenAI.ChatCompletionMessageCustomToolCallCustom": {
"type": "object",
"required": [
"name",
"input"
],
"properties": {
"name": {
"type": "string"
},
"input": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionMessageToolCall": {
"type": "object",
"required": [
"id",
"type",
"function"
],
"properties": {
"id": {
"type": "string",
"description": "The ID of the tool call."
},
"type": {
"type": "string",
"enum": [
"function"
],
"description": "The type of the tool. Currently, only `function` is supported.",
"x-stainless-const": true
},
"function": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.ChatCompletionMessageToolCallFunction"
}
],
"description": "The function that the model called."
}
},
"description": "A call to a function tool created by the model.",
"title": "Function tool call"
},
"OpenAI.ChatCompletionMessageToolCallChunk": {
"type": "object",
"required": [
"index"
],
"properties": {
"index": {
"type": "integer"
},
"id": {
"type": "string",
"description": "The ID of the tool call."
},
"type": {
"type": "string",
"enum": [
"function"
],
"description": "The type of the tool. Currently, only `function` is supported.",
"x-stainless-const": true
},
"function": {
"$ref": "#/$defs/OpenAI.ChatCompletionMessageToolCallChunkFunction"
}
}
},
"OpenAI.ChatCompletionMessageToolCallChunkFunction": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"arguments": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionMessageToolCallFunction": {
"type": "object",
"required": [
"name",
"arguments"
],
"properties": {
"name": {
"type": "string"
},
"arguments": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionMessageToolCallsItem": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/$defs/OpenAI.ChatCompletionMessageToolCall"
},
{
"$ref": "#/$defs/OpenAI.ChatCompletionMessageCustomToolCall"
}
]
},
"description": "The tool calls generated by the model, such as function calls."
},
"OpenAI.ChatCompletionResponseMessage": {
"type": "object",
"required": [
"content",
"refusal",
"role"
],
"properties": {
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"refusal": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tool_calls": {
"$ref": "#/$defs/OpenAI.ChatCompletionMessageToolCallsItem"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionResponseMessageAnnotations"
},
"description": "Annotations for the message, when applicable, as when using the\n [web search tool](/docs/guides/tools-web-search?api-mode=chat)."
},
"role": {
"type": "string",
"enum": [
"assistant"
],
"description": "The role of the author of this message.",
"x-stainless-const": true
},
"function_call": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.ChatCompletionResponseMessageFunctionCall"
}
],
"description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.",
"deprecated": true
},
"audio": {
"anyOf": [
{
"$ref": "#/$defs/OpenAI.ChatCompletionResponseMessageAudio"
},
{
"type": "null"
}
]
},
"reasoning_content": {
"type": "string",
"description": "An Azure-specific extension property containing generated reasoning content from supported models."
}
},
"description": "If the audio output modality is requested, this object contains data\nabout the audio response from the model."
},
"OpenAI.ChatCompletionResponseMessageAnnotations": {
"type": "object",
"required": [
"type",
"url_citation"
],
"properties": {
"type": {
"type": "string",
"enum": [
"url_citation"
],
"x-stainless-const": true
},
"url_citation": {
"$ref": "#/$defs/OpenAI.ChatCompletionResponseMessageAnnotationsUrlCitation"
}
}
},
"OpenAI.ChatCompletionResponseMessageAnnotationsUrlCitation": {
"type": "object",
"required": [
"end_index",
"start_index",
"url",
"title"
],
"properties": {
"end_index": {
"type": "integer"
},
"start_index": {
"type": "integer"
},
"url": {
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionResponseMessageAudio": {
"type": "object",
"required": [
"id",
"expires_at",
"data",
"transcript"
],
"properties": {
"id": {
"type": "string"
},
"expires_at": {
"type": "integer",
"format": "unixtime"
},
"data": {
"type": "string"
},
"transcript": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionResponseMessageFunctionCall": {
"type": "object",
"required": [
"arguments",
"name"
],
"properties": {
"arguments": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionStreamResponseDelta": {
"type": "object",
"properties": {
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"function_call": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.ChatCompletionStreamResponseDeltaFunctionCall"
}
],
"description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.",
"deprecated": true
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionMessageToolCallChunk"
}
},
"role": {
"type": "string",
"enum": [
"developer",
"system",
"user",
"assistant",
"tool"
],
"description": "The role of the author of this message."
},
"refusal": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reasoning_content": {
"type": "string",
"description": "An Azure-specific extension property containing generated reasoning content from supported models."
}
},
"description": "A chat completion delta generated by streamed model responses."
},
"OpenAI.ChatCompletionStreamResponseDeltaFunctionCall": {
"type": "object",
"properties": {
"arguments": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"OpenAI.ChatCompletionTokenLogprob": {
"type": "object",
"required": [
"token",
"logprob",
"bytes",
"top_logprobs"
],
"properties": {
"token": {
"type": "string",
"description": "The token."
},
"logprob": {
"type": "number",
"description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely."
},
"bytes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "null"
}
]
},
"top_logprobs": {
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionTokenLogprobTopLogprobs"
},
"description": "List of the most likely tokens and their log probability, at this token position. The number of entries may be fewer than the requested `top_logprobs`."
}
}
},
"OpenAI.ChatCompletionTokenLogprobTopLogprobs": {
"type": "object",
"required": [
"token",
"logprob",
"bytes"
],
"properties": {
"token": {
"type": "string"
},
"logprob": {
"type": "number"
},
"bytes": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "null"
}
]
}
}
},
"OpenAI.CompletionUsage": {
"type": "object",
"required": [
"completion_tokens",
"prompt_tokens",
"total_tokens"
],
"properties": {
"completion_tokens": {
"type": "integer",
"description": "Number of tokens in the generated completion."
},
"prompt_tokens": {
"type": "integer",
"description": "Number of tokens in the prompt."
},
"total_tokens": {
"type": "integer",
"description": "Total number of tokens used in the request (prompt + completion)."
},
"completion_tokens_details": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.CompletionUsageCompletionTokensDetails"
}
],
"description": "Breakdown of tokens used in a completion."
},
"prompt_tokens_details": {
"allOf": [
{
"$ref": "#/$defs/OpenAI.CompletionUsagePromptTokensDetails"
}
],
"description": "Breakdown of tokens used in the prompt."
}
},
"description": "Usage statistics for the completion request."
},
"OpenAI.CompletionUsageCompletionTokensDetails": {
"type": "object",
"properties": {
"accepted_prediction_tokens": {
"type": "integer"
},
"audio_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
},
"rejected_prediction_tokens": {
"type": "integer"
}
}
},
"OpenAI.CompletionUsagePromptTokensDetails": {
"type": "object",
"properties": {
"audio_tokens": {
"type": "integer"
},
"cached_tokens": {
"type": "integer"
}
}
},
"OpenAI.CreateChatCompletionResponseChoices": {
"type": "object",
"required": [
"finish_reason",
"index",
"message",
"logprobs"
],
"properties": {
"finish_reason": {
"type": "string",
"enum": [
"stop",
"length",
"tool_calls",
"content_filter",
"function_call"
]
},
"index": {
"type": "integer"
},
"message": {
"$ref": "#/$defs/OpenAI.ChatCompletionResponseMessage"
},
"logprobs": {
"anyOf": [
{
"$ref": "#/$defs/OpenAI.CreateChatCompletionResponseChoicesLogprobs"
},
{
"type": "null"
}
]
},
"content_filter_results": {
"$ref": "#/$defs/AzureContentFilterResultForChoice"
}
}
},
"OpenAI.CreateChatCompletionResponseChoicesLogprobs": {
"type": "object",
"required": [
"content",
"refusal"
],
"properties": {
"content": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionTokenLogprob"
}
},
{
"type": "null"
}
]
},
"refusal": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionTokenLogprob"
}
},
{
"type": "null"
}
]
}
}
},
"OpenAI.CreateChatCompletionStreamResponseChoices": {
"type": "object",
"required": [
"delta",
"finish_reason",
"index"
],
"properties": {
"delta": {
"$ref": "#/$defs/OpenAI.ChatCompletionStreamResponseDelta"
},
"logprobs": {
"anyOf": [
{
"$ref": "#/$defs/OpenAI.CreateChatCompletionStreamResponseChoicesLogprobs"
},
{
"type": "null"
}
]
},
"finish_reason": {
"anyOf": [
{
"type": "string",
"enum": [
"stop",
"length",
"tool_calls",
"content_filter",
"function_call"
]
},
{
"type": "null"
}
]
},
"index": {
"type": "integer"
}
}
},
"OpenAI.CreateChatCompletionStreamResponseChoicesLogprobs": {
"type": "object",
"required": [
"content",
"refusal"
],
"properties": {
"content": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionTokenLogprob"
}
},
{
"type": "null"
}
]
},
"refusal": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/OpenAI.ChatCompletionTokenLogprob"
}
},
{
"type": "null"
}
]
}
}
}
}
}
}Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"azure","endpointId":"chat/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}