Chat completions
PreviewThe primary endpoint: send messages, receive a model response, in one shape across every provider.
Last updated 2026-07-24
Preview: This endpoint ships with the API launch. The shape below is the interface we are building to. It is documented now so you can plan an integration, not so you can call it today.
Chat completions is the endpoint most applications use. You send an ordered list of messages (each with a role and content) and receive the model's reply. Webparam accepts one request shape and translates it into whichever provider actually serves the model you named, so the same code works across providers with different native schemas.
The translation matters more than it sounds. Providers differ in how they express system instructions, multimodal content blocks, tool definitions and reasoning options. Normalising those differences at the gateway is what makes a model name a configuration value rather than an integration project.
Request
| Field | Type | Description |
|---|---|---|
| model | string | Model id, e.g. deepseek/deepseek-v3.2 |
| messages | array | Ordered messages with role and content |
| stream | boolean | Stream tokens as server-sent events |
| tools | array | Tool definitions the model may call |
| response_format | object | Request structured JSON output |
| provider | object | Routing strategy and data-policy preferences |
curl https://api.webparam.com/v1/chat/completions \
-H "Authorization: Bearer $WEBPARAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4.5",
"messages": [
{ "role": "system", "content": "You are a concise technical writer." },
{ "role": "user", "content": "Explain context windows in two sentences." }
],
"provider": { "strategy": "balanced" }
}'Illustrative: API not yet live
Response
Responses carry the message content plus usage metadata: input, output and, where a provider reports them, cached and reasoning token counts. Usage is normalised across providers so cost reconciliation means the same thing everywhere.
While the API is in build, you can explore the same models two ways: ask Echo how a request and response fit together, or browse the catalogue to compare pricing, context and capabilities.