API Reference
Base URL: https://api.agentlayer.dev
Authentication
All API requests require a Bearer token. Get your API key from the dashboard.
Authorization: Bearer al_dev_xxxxxxxxxxxxxxxxxxxxAgent clients authenticate with per-agent API keys, which you manage via the Agents endpoint.
Rate Limiting
Starter: 10 req/s. Pro: 100 req/s. Business: 1,000 req/s. Enterprise: custom. Rate limit headers included in every response. 429 responses include Retry-After.
Endpoints
/v1/apisCreate a new API definition from an OpenAPI spec or JSON config.
/v1/apisList all your published APIs with status, call counts, and revenue.
/v1/apis/{apiId}Get detailed information about a specific API, including agent discoverability.
/v1/apis/{apiId}/pricingUpdate pricing configuration: free tier, per-call rate, subscription tiers.
/v1/apis/{apiId}/publishPublish API to MCP Marketplace, GPT Store, and agent directories.
/v1/apis/{apiId}/analyticsGet usage analytics: calls, latency, revenue, agent sources, errors.
/v1/apis/{apiId}/agentsList all agents subscribed to your API with usage per agent.
/v1/webhooksRegister webhook endpoints for real-time call notifications and alerts.
/v1/billingGet current billing summary: revenue, fees, pending payouts.
/v1/billing/payoutRequest manual payout. Auto-payouts processed monthly on Pro+ plans.
MCP (Model Context Protocol) Integration
Every API is automatically exposed as an MCP server. Agents connect via:
{ "mcpServers": { "your-api": { "command": "npx", "args": ["@agentlayer/mcp", "--api-id", "your-api-id", "--key", "$AGENT_KEY"] } }}Want to test endpoints? Sign up for a free account to get an API key.
Get Free API Key