Skip to main content
POST
Runs one chat completion against the selected Dolphin model. This endpoint is x402-protected: unpaid requests receive 402 Payment Required, and paid requests must include the X-PAYMENT header.

Headers

Content-Type
string
required
Must be application/json.
X-PAYMENT
string
Base64-encoded signed x402 payment payload. Omit on the first request to receive the payment requirements via a 402 response.

Body

messages
array
required
Conversation history as an array of { role, content } objects. Roles are user and assistant. Must be non-empty.
model
string
default:"dolphinserver:24B"
Model ID. Must be one of the IDs returned by GET /v1/inference/models. Invalid values return 400 with the supported list.
template
string
default:"logical"
Prompt template. Must be one of the names returned by GET /v1/inference/templates. Invalid values return 400 with the supported list.

Response

On success (200), the completion is streamed as text/event-stream. Each event is an OpenAI-style chunk; concatenate choices[0].delta.content across chunks to build the full reply. Settlement details (including the transaction hash) are returned in the X-PAYMENT-RESPONSE header.