> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.agentrouter.to/api-reference/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentrouter.to/_mcp/server. # API Reference ## Docs - [Models](https://docs.agentrouter.to/domains/models.md): Discover models, compare prices, and run chat or code completion - [List All Models](https://docs.agentrouter.to/domains/models/list-all-models.md): Get live model IDs, supported parameters, context windows, and prices - [Chat Completion](https://docs.agentrouter.to/domains/models/chat-completion.md): Run writing, reasoning, extraction, JSON, and HTML tasks with a selected model - [Code Completion](https://docs.agentrouter.to/domains/models/code-completion.md): Complete a code prefix or fill code between a prefix and suffix ## API Docs - AgentRouter API > Catalog [List supported domains](https://docs.agentrouter.to/api-reference/agent-router-api/catalog/list-domains.md) - AgentRouter API > Catalog [Get one domain](https://docs.agentrouter.to/api-reference/agent-router-api/catalog/get-domain.md) - AgentRouter API > Catalog [List capabilities for one domain](https://docs.agentrouter.to/api-reference/agent-router-api/catalog/list-capabilities.md) - AgentRouter API > Catalog [Get one capability](https://docs.agentrouter.to/api-reference/agent-router-api/catalog/get-capability.md) - AgentRouter API > Catalog [List routes for one domain](https://docs.agentrouter.to/api-reference/agent-router-api/catalog/list-domain-routes.md) - AgentRouter API > Catalog [List routes for one capability](https://docs.agentrouter.to/api-reference/agent-router-api/catalog/list-capability-routes.md) - AgentRouter API > Contracts [Get the field-level contract for one capability](https://docs.agentrouter.to/api-reference/agent-router-api/contracts/get-capability-contract.md) - AgentRouter API > Routing [Recommend the best route for a capability](https://docs.agentrouter.to/api-reference/agent-router-api/routing/recommend-capability-route.md) - AgentRouter API > Routing [Execute one capability](https://docs.agentrouter.to/api-reference/agent-router-api/routing/execute-capability.md) - AgentRouter API > Wallet [Read wallet balance](https://docs.agentrouter.to/api-reference/agent-router-api/wallet/get-wallet.md) - AgentRouter API > Usage [List recent usage](https://docs.agentrouter.to/api-reference/agent-router-api/usage/get-usage.md) - AgentRouter API > Development [Initialize non-production development state](https://docs.agentrouter.to/api-reference/agent-router-api/development/dev-init.md) ## OpenAPI Specification The raw OpenAPI 3.1 specification for this API is available at: - [OpenAPI JSON](https://docs.agentrouter.to/openapi.json) - [OpenAPI YAML](https://docs.agentrouter.to/openapi.yaml) > **Note:** This page contains both a page directory (above) and the landing page content (below). The page directory is generated for agent use and does not appear on the landing page. > For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.agentrouter.to/api-reference/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.agentrouter.to/_mcp/server. # API reference Use the API Reference tab for the full public AgentRouter API: catalog discovery, recommendation, execution, wallet, and usage. ## Core Endpoints * `GET /domains` * `GET /domains/{domainKey}` * `GET /domains/{domainKey}/capabilities` * `GET /domains/{domainKey}/capabilities/{capabilityId}` * `GET /domains/{domainKey}/capabilities/{capabilityId}/contract` * `GET /domains/{domainKey}/routes` * `GET /domains/{domainKey}/capabilities/{capabilityId}/routes` * `POST /domains/{domainKey}/capabilities/{capabilityId}/recommend` * `POST /domains/{domainKey}/capabilities/{capabilityId}/execute` * `GET /wallet` * `GET /usage` ## How To Read The Reference Use the reference in this order: 1. Start with catalog endpoints such as `/domains` and `/capabilities`. 2. Read `/contract` when you need the field-level request shape. 3. Use `/recommend` when AgentRouter should choose the route. 4. Use `/execute` when you want the paid operation to happen. 5. Inspect `/wallet` and `/usage` after execution. ## Authentication All authenticated public calls use: ```http Authorization: Bearer aak_... ``` Get your API key from: ```text https://www.agentrouter.to/agentic-api/install ``` > **Note** > > For capability-scoped requests, the request body varies by capability. Use the contract endpoint to inspect required fields and examples. For concrete provider comparisons and domain-specific walkthroughs, jump to the supporting domain pages on the main site: * `https://www.agentrouter.to/supporting-domains/overview` * `https://www.agentrouter.to/supporting-domains/email` * `https://www.agentrouter.to/supporting-domains/enrichment` * `https://www.agentrouter.to/supporting-domains/social` * `https://www.agentrouter.to/supporting-domains/post` * `https://www.agentrouter.to/supporting-domains/broadcast` * `https://www.agentrouter.to/supporting-domains/finance` * `https://www.agentrouter.to/supporting-domains/geo`