Docs

Build on Miles

Use the Miles catalog, ask Miles questions from your code, or give an agent access to wallet tools.

Getting started

  • Personal API key

    Use a personal API key to ask Miles questions from your own code.

  • OAuth app

    Use OAuth 2.1 to call Miles on another user's behalf with their consent.

  • Connect over MCP

    Connect Claude Code or Codex to Miles and call a wallet tool.

Chat API

  • Chat API overview

    Use the OpenAI-compatible Chat API to get the answer Miles would give on askmiles.ai.

  • Requests and streaming

    Learn how to send a Chat API request and receive a streaming or non-streaming response.

  • Rate limits

    See the Chat API rate limits and the response headers your client can use to handle them.

  • Errors

    See every Chat API status, along with its cause and fix.

MCP

  • MCP overview

    Learn how to connect to the Miles MCP server and what access it provides.

  • Quotas and refusals

    See the daily MCP quotas and what happens when you reach them.

  • Tools the MCP server withholds

    See the 15 chat capabilities Miles does not expose through MCP, and why each is withheld.

  • Cards

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

  • Transfer partners

    Look up transfer partners, ratios, and point valuations, and test a transfer plan against a member's balances.

  • Wallet

    View a member's wallet and add or update their cards.

  • Balances

    Read and record the loyalty-point balances a member has shared with Miles.

  • Credits and certificates

    See and record the credits, certificates, and free-night awards a card grants and what's already been used.

  • Gift cards

    See and manage the gift cards in a member's wallet.

  • Elite status

    See and update the elite status tiers a member holds and the benefits each one grants.

  • Watchlist

    See and manage the cards a member is tracking to apply for, along with their notes and status.

  • Knowledge

    Search Miles' points-and-miles knowledge base for explanations and strategy advice.

  • All MCP tools

    See every MCP tool Miles provides.

Catalog

  • Catalog endpoints

    Get credit card, transfer partner, and point valuation data from the free, keyless catalog API.

  • Catalog errors

    See the response for a failed catalog request.

Agents

  • OpenClaw

    Connect an OpenClaw agent to the Miles wallet over MCP or use a skill for Miles' chat answers.

  • Skills

    See the two installable Miles skills and what each teaches an agent.

Reference

  • Error codes

    See every refusal code from the MCP tools, chat tools, and Chat API, along with what it means and what to send next.

Trust

  • Trust

    Learn how the data a tool returns is maintained, why it matches what Miles' own chat reads, and where API changes are recorded.

  • Changelog

    See dated changes clients could notice in the MCP server and Chat API, newest first.

  • Stability

    Learn what Miles promises to keep stable in the MCP server and Chat API and how breaking changes are handled.