---
name: aragon-router-api
description: "Use when the user wants to call language models, generate images/video/speech, or search media through AragonRouter."
metadata:
  version: "1.11.0"
---

# AragonRouter API

Read only the relevant sections of references/api-reference.md. Prefer the installed scripts/aragon.mjs tool: run doctor to validate the connection and discover capabilities without generation, then request --method GET --path /api/v1/models for models. Use request for both LLM protocols, image/video/speech generation, image/video/sound search, job polling and asset downloads; POST accepts --json-file or --json-stdin, downloads support --output. Use current model names, voices, limits and quota from discovery. Submit video once, retain its job id, then poll that job. Never print or copy private credentials; the tool reads its own project connection. Preserve attribution and report actual results. Follow the reference retry rules and do not repeat unknown paid submissions. If the local tool is absent, use the reference environment-variable examples, or upgrade from the gateway installation page. Do not require additional environment setup for an automatically connected installation.

```text
node <skill-directory>/scripts/aragon.mjs doctor
node <skill-directory>/scripts/aragon.mjs request --method GET --path /api/v1/models
node <skill-directory>/scripts/aragon.mjs request --method POST --path /api/v1/chat/completions --json-file request.json
```

- [Your first request](references/api-reference.md#quickstart)
- [Discover models and capabilities](references/api-reference.md#discovery)
- [Quota, errors, and retries](references/api-reference.md#quotas-errors)
- [Agent Skill installation](references/api-reference.md#agent-skill)

connection.json schemaVersion 2 contains only public metadata, a fixed credentialsFile path and skill/reference/runtime/gitignore SHA-256 hashes. The private .local/credentials.json stores the baseUrl and personal key together. scripts/aragon.mjs reads this pair automatically, independent of cwd, and ignores conflicting environment variables. Corrupt private configuration fails closed. Secrets and recovery files are protected and Git-ignored; Windows requires native ACL support. Revoke connections on the Install page or in My credentials. Legacy installs without the local runtime may keep using ARAGON_BASE_URL and ARAGON_API_KEY, or upgrade from /console/install.

Disable SDK/client automatic retries. Model/capability discovery, job GET and asset GET allow bounded retries. Search consumes quota: retry only after an explicitly recoverable rejection. Never blindly resend generation after a timeout, disconnect, 502/504 or submission_unknown; it may already be billed. Preserve request/job information, ask the user when another paid action is needed. Ordinary requests use a 600-second client timeout; requests timeout limits connect/read waits rather than an exact total wall clock. Stopping the local connection does not cancel upstream billing.
