UniRouteUniRoute

Media API keys and permissions

Understand unified API keys, the USD wallet, shared spending limits, and task access permissions.

Create a unified API key in console key management, or use an existing one. Use automatic channels (auto_channels), with no group binding or channel restrictions. The public image, video, and music APIs require this type of unified key. LLM-only group keys and channel-restricted keys are not suitable for this tutorial.

Your account needs an enabled USD wallet with available funds. The key must be valid, unexpired, and not revoked, with room under both its total and time-window limits. The account wallet pays the actual cost; the key's limit controls how much that key can spend. These are separate amounts. A key without a spending limit still incurs charges and cannot bypass the wallet balance requirement. LLM and media requests share the same key's spending limits, and tasks in progress also reserve budget.

If an existing key works, reuse it. You do not need a new key, a quota reset, or more funds merely to repeat an example. To create a key, follow Create an API key. Store the raw key in a private local file with chmod 600. Do not publish it or put it in a URL, Git, or logs.

All API requests use:

Authorization: Bearer YOUR_API_KEY

The API base address is https://api.uniroute.app. See the quickstart for a complete command-line example that does not expose the raw key in command arguments. Public file and CDN URLs in API responses do not require authentication. Download them in separate requests without sending or forwarding the Bearer token.

Task queries, history, and idempotent replay are scoped to the same key that created the task. Another key cannot access the task, even if it belongs to the same account; queries return 404. After a key is revoked, API requests return 401. Revoking a key does not remove charges or outstanding settlement obligations for accepted tasks.

Do not use a new key or recreate a task to resolve an unknown bill. Keep the task ID, idempotency key, and original request. Query with the original key or contact support. See billing and recovery.