POST
$0.0023 default
/v1/chat/completionsDescription
Signed spend receipts for agent x402 payments — who paid which call, verifiable by a third party. Treasury desk and possession book for agent spend — export, policy, evidence. POST /v1/chat/completions is the x402 USDC door on Base and Solana. Returns signed receipt + public verify_url. Paying this host is real mainnet USDC.
Pricing
$0.0023 default
Request schema
{
"properties": {
"max_tokens": {
"description": "Output token budget",
"type": "integer"
},
"messages": {
"description": "OpenAI-style chat messages array",
"items": {
"properties": {
"content": {
"type": "string"
},
"role": {
"enum": [
"system",
"user",
"assistant"
],
"type": "string"
}
},
"required": [
"role",
"content"
],
"type": "object"
},
"type": "array"
},
"model": {
"description": "Model id from GET /v1/models; xfuel/auto routes automatically",
"type": "string"
},
"stream": {
"type": "boolean"
},
"temperature": {
"maximum": 2,
"minimum": 0,
"type": "number"
}
},
"required": [
"messages"
],
"type": "object"
}Example response
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello!",
"role": "assistant"
}
}
],
"created": 1700000000,
"id": "chatcmpl-abc123",
"model": "xfuel/auto",
"object": "chat.completion",
"usage": {
"completion_tokens": 5,
"prompt_tokens": 10,
"total_tokens": 15
},
"xfuel": {
"verify_url": "https://api.xfuel.app/receipt/xfuel-abc123"
}
}