curl -X GET 'https://api.anyformat.ai/key-check/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
response = requests.get(
"https://api.anyformat.ai/key-check/",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
response.raise_for_status()
print(response.json()["organization_id"])
const response = await fetch('https://api.anyformat.ai/key-check/', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
if (!response.ok) throw new Error(`Invalid API key: ${response.status}`);
const { organization_id, organization_name } = await response.json();
{
"valid": true,
"organization_id": "7f4a1c2e-0000-4000-8000-000000000001",
"organization_name": "Acme Corp",
"scopes": ["read", "write"]
}
{
"error": "Invalid API key",
"detail": "The provided API key is not recognised.",
"error_code": "INVALID_API_KEY",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Overview
Check API Key
Verify an API key without triggering a billable operation
GET
/
key-check
/
curl -X GET 'https://api.anyformat.ai/key-check/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
response = requests.get(
"https://api.anyformat.ai/key-check/",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
response.raise_for_status()
print(response.json()["organization_id"])
const response = await fetch('https://api.anyformat.ai/key-check/', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
if (!response.ok) throw new Error(`Invalid API key: ${response.status}`);
const { organization_id, organization_name } = await response.json();
{
"valid": true,
"organization_id": "7f4a1c2e-0000-4000-8000-000000000001",
"organization_name": "Acme Corp",
"scopes": ["read", "write"]
}
{
"error": "Invalid API key",
"detail": "The provided API key is not recognised.",
"error_code": "INVALID_API_KEY",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Confirms the caller’s API key is active and names its owning organization. The endpoint is unversioned.
- 200: the key is valid. The body carries
organization_id. It also carriesorganization_nameandscopeswhen they are available.scopeslists the granted scope names, and isnullwhen the key does not report them. - 401: the standard error envelope.
error_codeisMISSING_API_KEYwhen you send no key, andINVALID_API_KEYwhen the key is not recognised.
/me/organization/ round-trip as every authenticated request, so a successful check also warms the org cache.
curl -X GET 'https://api.anyformat.ai/key-check/' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
response = requests.get(
"https://api.anyformat.ai/key-check/",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
response.raise_for_status()
print(response.json()["organization_id"])
const response = await fetch('https://api.anyformat.ai/key-check/', {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});
if (!response.ok) throw new Error(`Invalid API key: ${response.status}`);
const { organization_id, organization_name } = await response.json();
{
"valid": true,
"organization_id": "7f4a1c2e-0000-4000-8000-000000000001",
"organization_name": "Acme Corp",
"scopes": ["read", "write"]
}
{
"error": "Invalid API key",
"detail": "The provided API key is not recognised.",
"error_code": "INVALID_API_KEY",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Authorizations
Response
Successful Response
Confirms the API key is valid and names its owning organization.

