Public preview: This API is in public preview. Endpoints, schemas, and limits may change before general availability.

Authentication

Creating, using, rotating, and revoking API keys.

Every request to /v1 must include an API key. Authentication uses the standard Authorization: Bearer … header.

The header#

POST /v1/responses HTTP/1.1
Host: api.eugpt.ai
Authorization: Bearer eugpt_AbCdEf01234567890_redacted
Content-Type: application/json

API keys always start with eugpt_, followed by 43 characters. The prefix is the easiest way to spot a leaked key in logs and scanners.

Creating keys#

Keys are managed on the API Keys page of the EU GPT web app:

  1. Sign in at chat.eugpt.ai.
  2. Click your name at the bottom of the sidebar and choose API Keys.
  3. Type a descriptive name and click Generate key. The key list is what you will see when something breaks at 2 a.m. Without a name, the key is called “API key” followed by today’s date.
  4. Copy the key from the yellow box. It is shown once. After you leave the page the full key is gone; the list only shows its first characters, when it was created, and when it was last used.

Getting started shows each step with a screenshot.

A key belongs to the user who created it. Requests made with the key act as that user: they use that user’s organisation, agents (projects), conversations, and files, and they are paid from that user’s prepaid balance, or the organisation’s in a business organisation.

Rate limits & quotas#

You cannot set a rate limit or a monthly cap on an individual key yet; this is planned. All your keys draw on the same prepaid balance; see Usage limits & billing.

Rotating keys#

Keys created in the web app do not expire. Rotate by:

  1. Creating a new key in the web app.
  2. Deploying the new key into your application.
  3. Revoking the old key once you have confirmed the new one is working.

Plan rotations on a cadence that matches your security posture: quarterly is a reasonable default for most teams.

Revoking keys#

On the API Keys page, click Revoke next to the key you want to disable. There is no confirmation step, so check the name first. Revocation is immediate: the next request with that key receives 401 Unauthorized.

The key list on the API Keys page, with the Revoke button of one key highlighted
Each key shows its name, its first characters, and when it was created and last used.

Scoping#

A key can do what the user who created it can do:

  • Agents (projects): passing a project_id for an agent you are not a member of returns 403; one that does not exist returns 404.
  • Conversations and files belong to the user: another user’s conversation returns 404, and the Files API only lists and returns your own files.
  • Organisation settings apply: if an admin switched off web tool calls, the web_search and web_fetch tools are not used.
  • Billing applies: requests are paid from the prepaid balance; without enough credit they return 402.

Common errors#

StatusWhat it meansFix
401Missing, malformed, unknown, or revoked key.Check that the header is sent as Bearer eugpt_…, or create a new key.
402The prepaid balance that pays for API usage cannot cover the request.Add credit, or fix auto top-up.
403The key is valid but the request is not allowed: you are not a member of the agent.Check agent membership.

The full error reference is in Errors.