AIXHUBDocs
Panel tutorials

API key management

Create, store, use, and revoke AIXHUB API keys without exposing credentials in source code.

An API key authorizes requests against your AIXHUB account. Separate keys for devices and purposes are easier to identify and revoke than one credential shared everywhere.

Prerequisites

  • You are signed in to the AIXHUB console.
  • You have a password manager or operating-system credential store ready.
  • You have a clear purpose for the key, such as “personal laptop Claude Code” or “test SDK.”

Steps

  1. Open API keys from the side navigation.

  2. Create a key with a name that identifies its device and purpose. If the page offers limits or scope controls, grant only what this task needs.

  3. Copy the key and put it in secure storage immediately. Documentation examples use sk-your-key or environment variables. They never require a real key in docs or chat.

  4. Put the key in an environment variable for the current terminal.

    export AIXHUB_API_KEY="sk-your-key"
  5. To configure a client, use the key's Use key action and copy the Base URL, environment variables, or configuration generated by the panel.

  6. Revoke a key immediately when it is lost, transferred, or potentially exposed. Create a replacement instead of continuing to use the old value.

Verification

The new entry appears in the key list, a minimal API call succeeds with it, and the same key receives an authentication error after revocation.

Do not revoke your only everyday key just to test. Create a short-lived test credential for the revocation check.

Troubleshooting

  • The full value is no longer visible: Some interfaces show it only at creation. Revoke and replace it if it cannot be recovered.
  • 401 authentication error: Check for copied whitespace and make sure you did not submit the variable name as the value.
  • A key was committed to Git: Revoke it immediately, remove sensitive history, and switch to environment variables or secret management.
  • The Base URL is unclear: Open Use key and copy the complete client-specific setup. Do not append /v1 or /v1beta by guesswork.

Next step

Complete Quick start, then choose Claude Code, Codex CLI, or the generic OpenAI-compatible client guide.

On this page