Docs

Build on Miles

Three ways in. A personal API key asks Miles a question from your own code. An OAuth app does the same for someone else's account, with their approval. The MCP server hands an agent the wallet tools and leaves the reasoning to it. The keyless catalog needs none of the three.

Getting started

  • Personal API key

    Mint a key in Settings, paste it into an OpenAI client, and ask Miles a question from your own code in four steps.

  • OAuth app

    Register a client, send a user through consent, and call Miles on their behalf: the full OAuth 2.1 sequence, with every request and response.

  • Connect over MCP

    Add the Miles server to Claude Code or Codex, approve it once in the browser, and call a wallet tool: three steps.

Chat API

  • Chat API overview

    An OpenAI-compatible endpoint that returns the answer Miles would give on the site: one model, no server-side state, read-only tools.

  • Requests and streaming

    The request body, a complete non-streaming call, and a streaming call with what each server-sent chunk looks like.

  • Rate limits

    Requests per minute and turns at once, counted per grant, with the headers every response carries so a client can plan around them.

  • Errors

    Every status the Chat API returns, with its type, code, cause and fix, in the OpenAI error envelope.

MCP

  • MCP overview

    The Miles MCP server: its URL, the two scopes, what Membership gates, how a third-party client's results are redacted, and the schema promise.

  • Quotas and refusals

    The four daily ceilings, when they reset, what a refusal looks like on the wire, and how to tell a spent ceiling from a scope or Membership refusal.

  • What is not a tool

    Ten capabilities the chat pipeline has that the MCP server deliberately does not expose, and the reason for each.

  • Cards

    Search the card catalog and get a card, comparison, or offer recommendation grounded in a member's own wallet.

  • Transfer partners

    Transfer partner routes and ratios, point valuations, and running a transfer plan against a member's balances.

  • Wallet

    The wallet itself: its cards, benefits, spending strategy, eligibility, and the tools that add or update a card.

  • Balances

    Loyalty-point balances a member has told Miles about, and the reconciliation questions a transactions agent could answer.

  • Credits and certificates

    Annual credits, certificates, and free-night awards: what a card grants and what's already been used.

  • Gift cards

    The gift cards in a member's wallet, and adding, updating, or removing one.

  • Elite status

    Elite status tiers a member holds and the benefits each one grants.

  • Watchlist

    Cards a member is tracking to apply for, with notes and status.

  • Knowledge

    Retrieval over Miles' points-and-miles knowledge base, for explanation and strategy questions the structured tools don't cover.

  • All MCP tools

    Every MCP tool Miles exposes, grouped by domain, on one page — the fetch an agent makes instead of nine.

Catalog

  • Catalog endpoints

    The free, keyless catalog API: credit card, transfer partner, and point valuation data.

  • Catalog errors

    What a catalog request returns when it doesn't succeed.

Agents

  • OpenClaw

    Connect an OpenClaw agent to Miles two ways: the wallet over MCP, and Miles' chat answers as a skill.

  • Skills

    Two installable skill files, what each teaches an agent, and why the URL is the upgrade path.

Trust

  • Trust

    Where the data comes from, how it is maintained, and how Miles makes money, for a developer deciding whether to build on it.

  • Changelog

    Dated changes to the MCP server and the Chat API that a client could notice, newest first.

  • Stability

    What Miles promises not to change on the MCP server and the Chat API, how a breaking change ships when one must, and the one exception on record.