curl -N -X POST https://pearl.computer/v1/inference/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "hey" }],
"model": "dolphin/dolphinserver:24B",
"template": "logical"
}'
curl -i -X POST https://pearl.computer/v1/inference/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "hey" }],
"model": "surplus/zai-org/glm-4.5",
"stream": true
}'
{
"x402Version": 2,
"resource": {
"url": "https://pearl.computer/v1/inference/chat"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "12000",
"payTo": "0x...",
"extra": { "name": "USD Coin", "version": "2" }
}
]
}
data: {"choices":[{"delta":{"content":"Hey"}}]}
data: {"choices":[{"delta":{"content":" there!"}}]}
data: [DONE]
{
"error": "Unknown model \"nosuch/model\"",
"supported": ["dolphin/dolphinserver:24B", "surplus/zai-org/glm-4.5"],
"supportedTruncated": 312
}
Inference
Chat Completion
Unified streaming chat across inference providers
POST
/
v1
/
inference
/
chat
curl -N -X POST https://pearl.computer/v1/inference/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "hey" }],
"model": "dolphin/dolphinserver:24B",
"template": "logical"
}'
curl -i -X POST https://pearl.computer/v1/inference/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "hey" }],
"model": "surplus/zai-org/glm-4.5",
"stream": true
}'
{
"x402Version": 2,
"resource": {
"url": "https://pearl.computer/v1/inference/chat"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "12000",
"payTo": "0x...",
"extra": { "name": "USD Coin", "version": "2" }
}
]
}
data: {"choices":[{"delta":{"content":"Hey"}}]}
data: {"choices":[{"delta":{"content":" there!"}}]}
data: [DONE]
{
"error": "Unknown model \"nosuch/model\"",
"supported": ["dolphin/dolphinserver:24B", "surplus/zai-org/glm-4.5"],
"supportedTruncated": 312
}
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.
curl -N -X POST https://pearl.computer/v1/inference/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "hey" }],
"model": "dolphin/dolphinserver:24B",
"template": "logical"
}'
curl -i -X POST https://pearl.computer/v1/inference/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "hey" }],
"model": "surplus/zai-org/glm-4.5",
"stream": true
}'
{
"x402Version": 2,
"resource": {
"url": "https://pearl.computer/v1/inference/chat"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "12000",
"payTo": "0x...",
"extra": { "name": "USD Coin", "version": "2" }
}
]
}
data: {"choices":[{"delta":{"content":"Hey"}}]}
data: {"choices":[{"delta":{"content":" there!"}}]}
data: [DONE]
{
"error": "Unknown model \"nosuch/model\"",
"supported": ["dolphin/dolphinserver:24B", "surplus/zai-org/glm-4.5"],
"supportedTruncated": 312
}