API reference · API
Call one market tool, paid per call
POST/v1/tools/{server}/{tool}/callAPI key
Chat scope; a key policy may keep a key off it with the tools wire, and its model lists and budgets judge the call by its id tool/<server>/<tool>. Paid from a balance only, never the free allowance: the billed price is held, then charged only when the tool answered without an error. A tool's own error (is_error true) costs nothing; a server that fails is 502 and one past 30 s is 504, both code tool_failed and free. The billed figure is in x-antimatter-cost-micros. A 404 at every path while the operator has not opened the tools market.
Parameters
| Field | Type | What it is |
|---|---|---|
| server (path)required | string | |
| tool (path)required | string |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| arguments | object |
Example
{
"arguments": {}
}Answer 200
The tool's result.
| Field | Type | What it is |
|---|---|---|
| object | "tool.result" | |
| id | string | The request id, also x-antimatter-request-id. |
| server | string | |
| tool | string | |
| content | array of object | The MCP result's content items: text, image, audio, resource_link or resource. |
| structured_content | any | |
| is_error | boolean | The tool answered an error of its own; such a call is not billed. |
| cost_micros | integer | |
| ms | integer |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 402OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 429Rate limited, or a spent budget or spend cap. The type distinguishes rate_limit_error, policy_exceeded, and spend_cap_exceeded.
- 502OpenAI shaped error.
- 504OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.