AI & LLMs

Plug your AI into live exchange rates

CurrencyRest is built to be consumed by AI agents. A model-readable llms.txt, clean JSON responses and ready-to-use function calling: ChatGPT, Claude, Gemini or your own agent get reliable rates in a single request.

llms.txt

We publish a machine-readable llms.txt file: the entire API spec (endpoints, sources, free-tier limits, examples) in one document you can paste into your LLM’s context or have your agent fetch on the fly.

Fetch the specbash
curl https://currencyrest.com/llms.txt

Function calling

Declare CurrencyRest as a tool in your model. The LLM decides when to call it and fills in the parameters; you run the matching HTTP request.

Tool definition (OpenAI / Claude tools)json
{
  "name": "get_exchange_rate",
  "description": "Get a real-time or historical currency exchange rate or convert an amount. Covers 190 fiat + 94 crypto currencies from central banks, Google Finance, Binance and CoinGecko.",
  "parameters": {
    "type": "object",
    "properties": {
      "from":   { "type": "string", "description": "ISO code, e.g. USD, EUR, XOF, BTC" },
      "to":     { "type": "string", "description": "ISO code, e.g. EUR, JPY, ETH" },
      "amount": { "type": "number", "description": "Amount to convert (default 1)" }
    },
    "required": ["from", "to"]
  }
}
Resulting callbash
# Your agent turns "convert 100 USD to XOF" into:
curl "https://api.currencyrest.com/api/v1/convert?from=USD&to=XOF&amount=100" \
  -H "X-API-Key: your_api_key_here"

# → { "from":"USD","to":"XOF","amount":100,"result":58200,"rate":582,"source":"ecb","timestamp":"..." }

Copy-paste system prompt

No function calling? Just paste these instructions into your assistant’s system prompt.

System prompttext
You can look up real-time exchange rates via the CurrencyRest API.
Base URL: https://api.currencyrest.com/api/v1
Auth: header "X-API-Key: <key>".
To convert: GET /convert?from=USD&to=EUR&amount=100
For a rate: GET /rates/pair?from=USD&to=EUR
The full, always-current spec lives at https://currencyrest.com/llms.txt — read it before calling the API.

Ready to connect your agent?

Create a free API key: full access to all 280+ currencies and every pair, 300 requests/month. Paid plans raise the monthly quota.