Skip to main content
A team API key belongs to a team. Whatever it spends comes from the teamโ€™s credits, and it keeps working after the person who made it leaves the team. Use one for a script, a service, or a CI job that works for the team. For your own work, use your personal API key, which acts as you.

Create a key

Keys live in the teamโ€™s settings on oxen.ai, under Integrations, then API keys. The page is also at https://www.oxen.ai/YOUR_TEAM/settings/api-keys. Every team member can see the list. Only team admins can create or revoke keys. A team's API keys page with active keys above revoked and expired keys Click Create API key and fill in three fields.
  • Name should say what the key is for, because commits the key makes carry the author <key name> (<team name>) and the email noreply@oxen.ai.
  • Role is Viewer or Editor. Roles lists what each can do.
  • Expiration is 3 days, 7 days, 30 days (the default), 1 year, Never, or a custom date. The key expires at the end of the chosen day.
The next dialog, Save your API key, shows the key once. It starts with oxen_sk_. Copy it before you close the dialog, because from then on the list shows only its last four characters. A lost key canโ€™t be recovered, so revoke it and make another.

Use a key

Send a team key the same way as a personal key. These examples read it from the OXEN_API_KEY environment variable.
The CLI and Python library keep one key per host in ~/.config/oxen/auth_config.toml. Setting a team key there replaces your personal key on that machine.

Roles

A viewer key is read only. It can clone and pull the teamโ€™s repositories, read data frames and run SQL queries on them, list models (GET /api/ai/models), and see the teamโ€™s API keys and generation history. The writes and generations an editor key can make get a 403 from a viewer key. An editor key can also do these things:
  • Run chat completions (POST /api/ai/chat/completions) and queued image, video, and audio generations (POST /api/ai/queue, then GET /api/ai/queue/<id> for the result), billed to the team.
  • Push to the teamโ€™s repositories with the CLI.
  • Create repositories in the team, upload files, and work in workspaces.
A keyโ€™s name and role are fixed. To change either, revoke the key and make a new one.

Expire and revoke

The list shows each keyโ€™s name, role, creator, creation date, last use, and expiration. Revoked and expired keys move to their own table below the active ones. A team admin revokes a key from its row in the list. New requests with that key get a 401 right away, and a generation still waiting in the queue fails when its turn comes. Revoking canโ€™t be undone.

Limits

Team keys canโ€™t read the teamโ€™s credit balance, cancel or retry a generation, or manage keys and team members. They also canโ€™t run plain language queries on data frames (text to SQL), which need a person signed in. A route that hasnโ€™t been opened to team keys refuses them with a 401 or a 403.