For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DashboardProduct
DocsAPI ReferenceArchitecture
DocsAPI ReferenceArchitecture
  • Overview
    • API reference overview
  • Panicly Gateway API
      • POSTCreate a chat completion
      • POSTCreate a response
      • POSTCreate embeddings
      • POSTCreate a legacy completion
LogoLogo
DashboardProduct
Panicly Gateway APIGateway

Create a chat completion

||View as Markdown|
POST
/v1/chat/completions
POST
/v1/chat/completions
$curl -X POST https://panicly.vercel.app/v1/chat/completions \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": "openrouter/auto",
> "messages": [
> {
> "role": "user",
> "content": "Write one sentence about protected AI spend."
> }
> ],
> "max_tokens": 64
>}'
1{
2 "id": "chatcmpl_panicly_example",
3 "object": "chat.completion",
4 "created": 1779993600,
5 "model": "openrouter/auto",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "content": "Panicly blocks risky model traffic before it can create upstream spend."
12 },
13 "finish_reason": "stop"
14 }
15 ]
16}

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.

Was this page helpful?
Previous

API reference overview

Next

Create a response

Built with

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