Chat completion (paid)
chatSends a chat completion through INFERVA's single endpoint and returns the reply with its USDG cost, fee breakdown, settlement hash and public receipt URL for verification.
Instructions
Send a chat completion through INFERVA's one endpoint. Requires INFERVA_API_KEY (an inf_sk_... agent key). The request is routed to a provider, metered, charged in USDG to the key owner's balance and written to the settlement log. Returns the reply plus cost_usdg, the fee breakdown (provider cost, protocol fee and its split between the capacity sponsor and the treasury), the settlement hash and a public receipt URL. Pass either prompt or messages.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model id from list_models. Default "auto" (cheapest active provider). | |
| prompt | No | A single user message. Shortcut for messages: [{ role: 'user', content: prompt }]. | |
| messages | No | Conversation, oldest first (the endpoint keeps the last 20). | |
| max_tokens | No | Output token limit (max 1024). |