API reference

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

Path and query parameters
FieldTypeWhat it is
server (path)requiredstring
tool (path)requiredstring

Request body

application/json, required

Request body fields
FieldTypeWhat it is
argumentsobject

Example

{
  "arguments": {}
}

Answer 200

The tool's result.

Fields of the 200 answer
FieldTypeWhat it is
object"tool.result"
idstringThe request id, also x-antimatter-request-id.
serverstring
toolstring
contentarray of objectThe MCP result's content items: text, image, audio, resource_link or resource.
structured_contentany
is_errorbooleanThe tool answered an error of its own; such a call is not billed.
cost_microsinteger
msinteger

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.

Antimatter