Chat with an open model
chatAnswers a chat with open models on Aquedra Run's own GPUs: qwen3-8b (reasons before answering, and those tokens count as output and use up max_tokens, so set max_tokens to at least 1024); qwen2.5-3b (small text model for simple tasks); qwen2.5-coder-7b (code); qwen2.5-vl-7b (reads data: images). It runs only on idle GPUs: if the GPUs are busy the call fails with gpu_busy and retry_after_seconds, and nothing is charged. Limits are 8192 tokens of context, up to 2048 output tokens (a larger max_tokens is lowered to that, and the result then has max_tokens_requested) and 1 MiB of arguments, with no tools, JSON mode or embeddings; qwen2.5-vl-7b takes up to 2 inline data: images of up to 512 KB each, which together must fit in the 1 MiB. Costs per million tokens (input/output): qwen3-8b US$0.18/US$0.70, qwen2.5-3b US$0.05/US$0.10, qwen2.5-coder-7b US$0.025/US$0.05, qwen2.5-vl-7b US$0.18/US$0.69; minimum US$0.0005 per call, taken from prepaid credits and charged only when the call works; prompts and answers are not stored. Set dry_run to true to get the maximum a call can cost and max_cost_usd to refuse a call that could cost more.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"messages": "<messages>"
},
"name": "chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Only 1 is supported. | |
| seed | No | Integer seed for repeatable sampling. | |
| stop | No | Up to 4 stop sequences of up to 64 characters each. | |
| model | No | Model id, default qwen3-8b. See GET /v1/models for the ones on sale. | |
| top_p | No | Nucleus sampling, 0 to 1. | |
| dry_run | No | When true, return the most this call can cost (cost_usd, the hold) and the max_tokens it assumes, without running it or charging anything. | |
| messages | Yes | The conversation, 1 to 64 messages. | |
| max_tokens | No | Most tokens to generate, default 1024. A larger value than the output cap (max_output_tokens in GET /v1/models) is lowered to it, and the response says so in max_tokens and max_tokens_requested. qwen3-8b's reasoning counts toward it: send at least 1024. | |
| temperature | No | Sampling temperature, 0 to 2. | |
| max_cost_usd | No | The most this call may cost, in USD, as a number or decimal text with at most 6 decimals (e.g. 0.01 or "0.01"). A call that would cost more is refused with 402 max_cost_exceeded and nothing is charged. | |
| response_format | No | Only {"type":"text"} is supported. | |
| max_completion_tokens | No | Same as max_tokens; wins when both are sent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | The model that answered (or would answer, with dry_run). | |
| price | No | Dry run only: the model's price per million tokens. | |
| usage | No | Tokens the call used. | |
| object | No | ||
| call_id | No | Server-issued id of the call. | |
| content | No | The model's answer; absent with dry_run. | |
| dry_run | No | True when nothing was run or charged. | |
| cost_usd | Yes | What the call cost (or the most it can cost, with dry_run), US dollars as decimal text. | |
| max_tokens | No | The max_tokens used: always with dry_run (the one the quote assumes); otherwise only when the max_tokens asked for was above the output cap and was lowered to it. | |
| balance_usd | No | Credit balance after the charge, US dollars as decimal text. | |
| min_call_usd | No | Dry run only: the minimum charge per call. | |
| finish_reason | No | stop, or length when max_tokens ran out. | |
| max_tokens_requested | No | Only when max_tokens was lowered to the output cap: the max_tokens asked for. | |
| estimated_prompt_tokens | No | Dry run only: the estimate of the prompt's tokens. |