Skip to content

API and agents

Connect your assistant or app to Rota Nacional. Set up, connect your account and make your first request.

Use Rota Nacional as your agent's model

Create the key and paste it where the step shows the key name.

Create a key

Choose your client

Claude Code

Terminal
Official instructions
  1. Add this to the settings file. Claude Code speaks the Anthropic Messages API, and Rota Nacional answers it.

    ~/.claude/settings.json
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://rota-nacional.ia.br",
        "ANTHROPIC_AUTH_TOKEN": "<ROTA_API_KEY>",
        "ANTHROPIC_MODEL": "rota/agentes"
      }
    }
  2. Start a new Claude Code session. Tools and streaming work as usual.

Connect an assistant

Choose your client

Codex CLI

Terminal
Official instructions
Authentication
MCP server URL
https://rota-nacional.ia.br/mcp

Sign in here to get the URL and commands with your account access included.

Manage or revoke API keys

  1. Add server
    codex mcp add rota-nacional --url 'https://rota-nacional.ia.br/mcp'
  2. Check connection
    codex mcp list
  3. Start a Codex session. Use /mcp to see the server and its tools.

After connecting, ask your agent

Which models are available for text summaries and what does each option cost?
Remove personal data from this text before I share it.
Summarize this text using my organization's privacy policy.
Extract this PDF's text and preserve page references for review.
My last AI request failed. Check whether it was charged before retrying.
Agent workflow guide

Integrate your application

Open API catalog

API catalog
curl -s https://rota-nacional.ia.br/api/
References

References

Request formats and authorization
  1. Choose an operation from the agent index or the API catalog.
  2. Read the operation’s reference in llms-full.txt.

    For one group of routes, add ?prefix=/api/… to the address.

  3. Before a request, check the operation’s authentication, usage limits and price.

    Before an external action, get authorization for that action.

  4. Read routes accept GET, POST, PUT or PATCH.

    Send the same parameters as JSON or form data.

    Responses use JSON. For HTML, set Accept: text/html.

Use these API references for integration. Do not scrape the main interface or assume permission to access accounts, make payments or send messages.

Read skill.md for agent instructions. Find all API references in api-catalog or at /discovery/resources.

Public data archives

Looking for something else?DocumentationContact