Skip to main content
POST
/
v3
/
chat
Create a chat completion via a Layer gate
curl --request POST \
  --url https://api.verlon.ai/v3/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "gateId": "<string>",
  "data": {
    "messages": [
      "<unknown>"
    ],
    "vars": {}
  },
  "model": "<string>",
  "metadata": "<unknown>",
  "endUserId": "<string>",
  "sessionId": "<string>"
}
'
{
  "error": "<string>",
  "message": "<string>",
  "details": "<unknown>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.verlon.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Layer API key (prefixed sk-). Generated from the dashboard under Settings → API Keys, or via layer key create in the CLI.

Body

application/json
gateId
string
required
data
object
required
model
string
metadata
any
endUserId
string
sessionId
string

Response

Chat completion response. Shape matches the underlying provider format selected by the gate (OpenAI-compatible by default). For streaming requests, returns SSE chunks instead of a single JSON body.