Create a chat completion

View as Markdown

Sends an OpenAI-compatible chat completion request through Panicly. Panicly authenticates the project key, evaluates controls, records a decision, and then forwards approved traffic upstream.

Authentication

AuthorizationBearer

Panicly project key supplied as Authorization: Bearer pk-live-....

OR
x-panicly-keystring

Panicly project key supplied directly in the x-panicly-key header.

Request

This endpoint expects an object.
modelstringRequired
Provider model identifier.
messageslist of objectsRequired
max_tokensintegerOptional
Maximum tokens requested from the provider.
temperaturedoubleOptional

Response

Provider response returned through Panicly.
idstring
objectstring
createdinteger
modelstring
choiceslist of maps from strings to any

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error