API keys

    Create, name, rename and revoke Ertas API keys for the AI Gateway, see what each key status means, and keep keys out of client-side code.

    Ask AI about this page
    On this page

    Every API call to the gateway carries an Ertas API key in the Authorization: Bearer header. OpenAI SDKs send it for you when you set api_key (Python) or apiKey (JavaScript).

    Create a key

    Open API Keys

    Step 1

    In the app, open Gateway → API Keys. If you haven't activated your endpoint yet, do that first: see Activating your endpoint.

    Name it

    Step 2

    Give the key a name of 1 to 64 characters that says where it's used, such as production-backend or local-dev.

    Copy it once

    Step 3

    The full key starts etk_ and is shown only when you create it. Store it in your environment or secret manager as ERTAS_API_KEY. Afterwards the app shows only its prefix.

    You can have up to 25 active keys. Use a separate key per app or environment, so you can revoke one without breaking the others.

    Key status

    StatusMeaning
    ActiveThe key works
    ActivatingThe key is saved and is being published to the gateway. It starts working within moments
    ExpiredThe key passed its expiry date. Create a new one
    RevokedThe key was revoked and can't be used or renamed

    Rename or revoke

    Rename a key from its menu in API Keys. Revoking a key stops it working on the next request; API calls that use it get 401 ertas_token_revoked. Revoking can't be undone.

    Keep keys secret

    • Call the gateway from your server. Never put a key in browser code, a mobile app bundle or a desktop app a user can unpack.
    • Read the key from the environment. Keep it out of source code, logs, screenshots and commits.
    • If a key leaks, revoke it and create a new one.