What does 401 missing_account_id mean?
You sent a key but no X-Clatter-Account header. The Model API needs both.
Code: missing_account_id · HTTP status: 401
The second header names the account that owns the key, like CL-7K2M9QXA. It's what makes a leaked key useless on its own.
Common causes#
- the OpenAI SDK was set up with only
base_urlandapi_key - a proxy or gateway in front of your app strips custom headers
- the environment variable holding the Account ID is empty
How to fix it#
- Find your Account ID in Console › Settings.
- Python:
OpenAI(..., default_headers={"X-Clatter-Account": "CL-..."}). - JavaScript:
new OpenAI({ ..., defaultHeaders: { "X-Clatter-Account": "CL-..." } }). - If a proxy sits in between, allow the header through.
Should my code retry?#
Not retryable until the header is added.
The error body uses the OpenAI shape, so OpenAI SDKs raise it as an exception you can catch:
{"error": {"message": "...", "type": "...", "code": "missing_account_id", "param": null}}
Every response also carries an X-Request-Id. Keep it in your logs; it's the quickest way for support to find a request.
See the full list in the Model API reference.
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.