OpenAI Chat Completions

Any model the workspace allows. model is auto or a name from GET /v1/models; the response names the model that answered and adds agentlab_decision.

post/v1/chat/completions

Request

Headers

X-AgentLab-Routing'auto' | 'auto:cost' | 'auto:balanced' | 'auto:quality'

Let the Gateway choose the model although the body names one, with that preference.

Idempotency-Keystring

Request body

modelstring required

auto, auto:cost, auto:quality or a name from GET /v1/models.

messagesobject[] required
max_completion_tokensinteger
max_tokensinteger
streamboolean
response_formatobject
userstring

Recorded as the request's end user.

Response

The model's answer, or a text/event-stream when stream is true.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.