x402 Inference
Chat Completion
Unified streaming chat across inference providers
POST
Runs a chat completion against the provider encoded in the model id. Dolphin
models are free. Paid providers may return a standard x402 challenge; payment
mechanics remain provider-specific behind this one endpoint.
Headers
string
required
Must be
application/json.string
Base64-encoded signed x402 payload. Omit on the first request. When the
selected provider returns
402, sign one accepted offer and retry the same
body with this header.Body
array
required
Non-empty conversation history as
{(role, content)} objects.string
default:"dolphinserver:24B"
Namespaced
provider/model id from GET /v1/inference/models. Unprefixed ids remain
Dolphin for backward compatibility.string
default:"logical"
Dolphin-only prompt template. Supplying it for another provider returns
400.
Fetch valid values from GET /v1/inference/templates.Response
Success is streamed astext/event-stream. Concatenate
choices[0].delta.content; the stream ends with data: [DONE]. Paid
providers return settlement metadata in PAYMENT-RESPONSE.