Developers
Build on Miles
Build with Miles using its catalog, tools, or chat answers.
Full reference, per section: Docs.
Catalog
- Endpoint
- https://api.askmiles.ai/v1
- What you get
- Free, keyless, read-only JSON for cards, transfer partners, and valuations.
- Whose account
- No account.
- Reasoning
- None (data only)
Tools
- Endpoint
- https://mcp.askmiles.ai/mcp
- What you get
- 58 agent tools for wallets, card data, points, and flight earning.
- Whose account
- Your user's Miles account.
- Reasoning
- You supply the reasoning
Chat
- Endpoint
- https://askmiles.ai/v1
- What you get
- Miles answers your question in one call.
- Whose account
- Your user's Miles account.
- Reasoning
- Miles supplies the reasoning
Catalog
The public catalog API
Free, keyless, and read-only: credit card, transfer partner, and point valuation data. It isn’t the full catalog the site runs on: reward multipliers, transfer ratios, and detailed benefit amounts stay out of the free schema. See What’s not here.
curl "https://api.askmiles.ai/v1/public/credit-cards?issuer=Chase&limit=5"- Base URL
- https://api.askmiles.ai/v1
- Authentication
- None. No key, no signup, no header required.
- Rate limit
- The worker enforces no rate limit on these routes. The catalog MCP server below allows 120 requests a minute per IP. This could change without notice, so don’t rely on an undocumented ceiling.
- Freshness
- The worker checks for a new dataset version on every request. Each response’s
Cache-Controlmax-age lets a client or proxy keep a copy for 30 minutes (search), an hour (cards, transfer partners, valuations), or a day (export downloads). The export list and status keep for 5 minutes. - Card coverage
- Open cards only. The export’s
countgives the current number. Retired, discontinued, product-change-only, waitlist-only, and closed cards are excluded before reaching this API. No parameter includes them. - CORS
- Any origin can call this API from a browser (
Access-Control-Allow-Origin: *). - What’s not here
- Reward multipliers, welcome-offer amounts, ongoing-value estimates, and application links are account-level data Miles computes per person. Transfer ratios, bonus sizes and expiry dates, and which transfer path is worth taking are the dataset’s own judgment. This API returns what exists: catalog data, the same for every caller.
Catalog endpoints
Catalog endpoints lists every card, transfer-partner, valuation, and export endpoint with its parameters, a curl command, and an example response.
Catalog errors
Every error is JSON, with the status code for a missing card, a malformed body, or an unavailable dataset. See Catalog errors.
The catalog as an MCP server
The same catalog, reachable by an AI agent without writing a client: five keyless, read-only tools, unrelated to the account-scoped tools below. See MCP overview.
claude mcp add --transport http miles-catalog https://api.askmiles.ai/mcpTools
58 tools, inside your agent
Your agent calls Miles’ tools against your user’s own wallet: their cards, their valuations, their balances. Miles returns data and arithmetic; your model does the reasoning, on your tokens. To connect Miles to an AI you already use, start at Connect.
MCP overview documents the URL, scopes, Membership gating, and framing resource. Quotas and refusals documents the ceilings and refusal payloads. MCP tools lists every tool by domain.
- Base URL
- https://mcp.askmiles.ai/mcp
Chat
Miles itself, in one call
Use this OpenAI-compatible endpoint with a server-side OpenAI client to ask Miles a card or points question in natural language. It returns the answer Miles would give on the site, from the same data and tools, with every tool read-only. Mint a personal API key in Settings and paste it into your client, or use an OAuth access token. OAuth tokens expire hourly and must be refreshed.
curl https://askmiles.ai/v1/chat/completions \
-H "Authorization: Bearer $MILES_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "miles", "messages": [{"role": "user", "content": "Which card should I use at Costco?"}]}'from openai import OpenAI
client = OpenAI(base_url="https://askmiles.ai/v1", api_key=MILES_API_KEY)
response = client.chat.completions.create(
model="miles",
messages=[{"role": "user", "content": "Which card should I use at Costco?"}],
)
print(response.choices[0].message.content)- Base URL
- https://askmiles.ai/v1
- Authentication
- A bearer token, either kind. For your own Miles account, a personal API key; for someone else’s, an OAuth access token with scope
miles:chat. Either way the credential belongs to a Miles account, not to you. - Reasoning
- Miles supplies the reasoning.
The model id, statelessness, and what is not supported are on Chat API overview. A full request and a streaming call are on Requests and streaming. The ceilings and every header are on Rate limits. Every status and cause is on Errors. Minting a personal key is on Personal API key.
Personal agents
The endpoint above comes packaged as a skill a personal agent (Claude Code, OpenClaw, anything skill-shaped) can install. Paste this to install it, and see Skills for what it teaches an agent and the OpenClaw install path.
Fetch https://askmiles.ai/skills/ask-miles.md and install it as the ask-miles skill. Then tell me which one-time authorization I need to complete.More
Full data, on your own account
Catalog data is the same for every caller. Tools and Chat, both documented above, require your user’s own Miles account for reward multipliers, ongoing-value estimates, and recommendations based on that user’s wallet. If you want those answers for yourself, use askmiles.ai directly or connect Miles to the AI you already use.