Skip to content

API & reference

Azure Chat

POST
/openai/deployments/{deployment}/chat/completions
curl --request POST \
--url http://localhost:8000/openai/deployments/example/chat/completions \
--header 'Content-Type: application/json' \
--data '{}'

Azure OpenAI’s URL shape, for clients written against it (AzureOpenAI): the same handler and checks as /v1/chat/completions, with the deployment as the task (a model alias, ratchet or a task name; the body’s model is not read) and the key in api-key. The api-version query parameter is accepted and ignored.

deployment
required
Deployment
string
x-ratchet-task
Any of:
string
x-ratchet-store
Any of:
string
x-api-key
Any of:
string
api-key
Any of:
string
idempotency-key
Any of:
string
x-stainless-retry-count
Any of:
string
Media typeapplication/json
object

Example generated

{}

Successful Response

Media typeapplication/json

Example generated

example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}