Persistent 404 Not Found for v1/organization/admin_api_keys

Hi everyone,

I’m running into a persistent 404 on the List Admin API Keys endpoint and wanted to check if anyone else has experienced this.

Endpoint: GET https://api.openai.com/v1/organization/admin_api_keys

What I’m running:

bash

curl "https://api.openai.com/v1/organization/admin_api_keys" \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json"

The key is valid — I can confirm this because the same Admin API key works fine on every other administration endpoint:

  • GET /v1/organization/usage :white_check_mark:

  • GET /v1/organization/users :white_check_mark:

  • GET /v1/organization/projects :white_check_mark:

So it’s not an authentication or permissions issue on my end.

Has anyone else hit this? Any help appreciated!

Hi @baluchicken

Thanks for the detailed report, super helpful.

I tested GET /v1/organization/admin_api_keys on my side with an Admin API key and it’s returning successfully, so the endpoint itself seems to be working.

Since your other org endpoints are working, this looks like something subtle in the request rather than permissions. A few things that are worth double-checking:

  • Exact path match – this endpoint is strict; even a small difference like a trailing slash (/admin_api_keys/) or typo can return a 404
  • Base URL – confirm you’re hitting https://api.openai.com/v1/organization/admin_api_keys exactly (no alternate base URL or proxy rewriting the path)
  • Key type – worth re-validating that the key being used at runtime is still an Admin key (especially if multiple keys/env vars are in play)

One quick sanity check: try running the curl command directly in a clean environment (no wrappers, no proxies) and see if the result changes.

~Smith

@OpenAI_Support I have previously used this endpoint and am now getting 404 every time with no changes

https://api.openai.com/v1/organization/admin_api_keys

I get a 500 error.

Repro in Python (warning: prints the environment variable admin API key for confirmation):

import os
import httpx

url = "https://api.openai.com/v1/organization/admin_api_keys"

headers = {
    "Authorization": f"Bearer {os.environ['OPENAI_ADMIN_KEY']}",
}

print(headers)

payload = {
    "name": "testkey",
}

response = httpx.post(url, headers=headers, json=payload)

print(response.status_code)
print(response.text)
print("request-id:", response.headers.get("x-request-id"))

Result

500
{
  "error": {
    "message": "The server had an error while processing your request. Sorry about that!",
    "type": "server_error",
    "param": null,
    "code": null
  }
}
request-id: ec0e3b9e-3f16-4155-b2de-16840421ea25
request-id: 82de595d-beba-4881-b6bb-8bab5522490c

If not sending “name”, you get a 400 error about the missing parameter as body message, so it is alive.

Admin keys making admin keys does seem a strange delegation, though. Perhaps this is reserved for enterprise partners with another superuser? Audit logging might be another dependency.

Appears to be an recurring, intermittent issue. The other day I couldn’t repro it either.

The API call is working as expected as of this morning. No longer getting a 404.