Build
Tool endpoints
Search, check and call paid data tools over plain HTTP from your own agent.
Building your own agent? Frames' tool search and pay-per-call data are also plain HTTP endpoints. They return the same results as the MCP tools, so an agent can switch between the two without changes. There's no Frames model in the loop: your agent decides what to call.
Endpoints#
| Endpoint | What it does | Cost | Body |
|---|---|---|---|
POST /v1/tools/search | Finds tools for what you describe. Top matches can come back ready to call, with a live check, a price and the input schema. | Free | queries (up to 4) or query; optional capability |
POST /v1/tools/probe | Checks up to 5 tools: whether they're up, their price and their exact inputs | Free, within an hourly allowance shared with MCP | ids |
POST /v1/tools/invoke | Calls up to 10 tools in parallel. Each call is checked, and calls that don't deliver are refunded. | Data that arrived, plus 15% | calls (each an id and args); optional max_usd, objective, search_ids, idempotency_key |
GET /v1/tools/spec | Tool definitions to import into any function-calling framework | Free, no key needed | None |
All of them take the same Authorization: Bearer <your key> header as the rest of the API, except /v1/tools/spec.
A typical flow#
- 1
Search the catalog#
Free. Describe what your agent needs, in up to four phrasings.
Terminal curl -X POST https://api.frames.ag/v1/tools/search \ -H "Authorization: Bearer $FRAMES_API_KEY" -H "Content-Type: application/json" \ -d '{"queries": ["twitter user profile", "recent tweets by user"]}' - 2
Invoke the tools your agent picked#
Paid. Pass the ids from the search as calls, with the
search_idit returned and anidempotency_keyso a retry can't pay twice.Terminal curl -X POST https://api.frames.ag/v1/tools/invoke \ -H "Authorization: Bearer $FRAMES_API_KEY" -H "Content-Type: application/json" \ -d '{ "calls": [{ "id": "<tool id from search>", "args": { "<input>": "<value>" } }], "search_ids": ["<search_id from step 1>"], "idempotency_key": "profiles-batch-001" }'
What comes back#
- Search hits: each has an
id,title,descriptionand payment details. Hits markedinvoke_readyalso carry a live check,price_usdand the tool's realinput_schema, so they don't need a probe. - Invoke results: one row per call with the response as the provider sent it, whether it delivered, what it cost and its receipt. Very large responses come back as a reference to read with
GET /v1/runs/{id}/tool-results. - Billing: a
billingblock with the credits charged, never more than the request's cap.
Errors and retries#
- No automatic fallback: if a provider rejects a call, the error comes back for your agent to handle. Frames doesn't swap in another tool.
- Retries: reuse the same
idempotency_keyand the batch is never paid twice.
Troubleshooting lists the error codes and what to do about each.