Create a chat completion via a Layer gate
Use when: caller wants a chat completion (multi-turn or single-prompt) routed through a Layer gate with automatic provider failover, quality scoring, and usage tracking
Routes a chat completion request through the named Layer gate. The gate decides which underlying model+provider serves the request based on its current configuration (primary model, fallback chain, parameter overrides). Supports both streaming and non-streaming responses. Layer handles provider auth, billing, observability, and fallback on failure.
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
Layer API key (prefixed sk-). Generated from the dashboard under Settings → API Keys, or via layer key create in the CLI.
Body
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.