Core - Retrieve key metadata
curl --request GET \
--url 'https://api.orq.ai/v2/api-keys/01HZXW2K7Y8Q9M0N1P2R3S4T5V' \
--header 'Authorization: Bearer $ORQ_API_KEY'
import { Orq } from '@orq-ai/node';
const client = new Orq({
apiKey: process.env.ORQ_API_KEY,
});
const result = await client.apiKeys.get({
apiKeyId: '01HZXW2K7Y8Q9M0N1P2R3S4T5V',
});
console.log(result.name);
import os
from orq_ai_sdk import Orq
client = Orq(api_key=os.environ["ORQ_API_KEY"])
result = client.api_keys.get(
api_key_id="01HZXW2K7Y8Q9M0N1P2R3S4T5V",
)
print(result.name)
{
"api_key": {
"api_key_id": "<string>",
"name": "<string>",
"owner": {
"user": {
"user_id": "<string>"
},
"service_account": {}
},
"project_scope": {
"all": {},
"single": {
"project_id": "<string>"
}
},
"token_prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"access": {},
"created_by_id": "<string>",
"updated_by_id": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"legacy_key_id": "<string>",
"budget": {
"budget_id": "<string>",
"limits": {
"amount": 123,
"token_limit": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"scope": {
"workspace": {},
"project": {
"project_id": "<string>"
},
"identity": {
"identity_external_id": "<string>"
},
"api_key": {
"api_key_id": "<string>"
},
"provider": {
"provider": "<string>"
},
"model": {
"model_id": "<string>"
}
},
"match": {
"cel": "<string>"
},
"rate_limit": {
"requests_per_minute": 123
},
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z",
"usage": {
"amount": 123,
"tokens": 123,
"requests": 123
},
"alerts": [
{
"threshold_percent": 123,
"notifier_ids": [
"<string>"
],
"id": "<string>"
}
]
},
"mcp_access": {
"deny_all": true,
"allowed_mcp_gateway_ids": [
"<string>"
],
"toolset_ids": [
"<string>"
]
}
}
}API Keys
Retrieve an API key
Retrieves the metadata for an existing API key by its unique identifier. The raw secret is never returned — only token_prefix, permission_mode, project_scope, and lifecycle fields.
GET
/
v2
/
api-keys
/
{api_key_id}
Core - Retrieve key metadata
curl --request GET \
--url 'https://api.orq.ai/v2/api-keys/01HZXW2K7Y8Q9M0N1P2R3S4T5V' \
--header 'Authorization: Bearer $ORQ_API_KEY'
import { Orq } from '@orq-ai/node';
const client = new Orq({
apiKey: process.env.ORQ_API_KEY,
});
const result = await client.apiKeys.get({
apiKeyId: '01HZXW2K7Y8Q9M0N1P2R3S4T5V',
});
console.log(result.name);
import os
from orq_ai_sdk import Orq
client = Orq(api_key=os.environ["ORQ_API_KEY"])
result = client.api_keys.get(
api_key_id="01HZXW2K7Y8Q9M0N1P2R3S4T5V",
)
print(result.name)
{
"api_key": {
"api_key_id": "<string>",
"name": "<string>",
"owner": {
"user": {
"user_id": "<string>"
},
"service_account": {}
},
"project_scope": {
"all": {},
"single": {
"project_id": "<string>"
}
},
"token_prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"access": {},
"created_by_id": "<string>",
"updated_by_id": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"legacy_key_id": "<string>",
"budget": {
"budget_id": "<string>",
"limits": {
"amount": 123,
"token_limit": 123
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"scope": {
"workspace": {},
"project": {
"project_id": "<string>"
},
"identity": {
"identity_external_id": "<string>"
},
"api_key": {
"api_key_id": "<string>"
},
"provider": {
"provider": "<string>"
},
"model": {
"model_id": "<string>"
}
},
"match": {
"cel": "<string>"
},
"rate_limit": {
"requests_per_minute": 123
},
"is_active": true,
"expires_at": "2023-11-07T05:31:56Z",
"usage": {
"amount": 123,
"tokens": 123,
"requests": 123
},
"alerts": [
{
"threshold_percent": 123,
"notifier_ids": [
"<string>"
],
"id": "<string>"
}
]
},
"mcp_access": {
"deny_all": true,
"allowed_mcp_gateway_ids": [
"<string>"
],
"toolset_ids": [
"<string>"
]
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
API key id to retrieve (e.g. 01H...).
Query Parameters
When true, embed the api-key-scoped budget (config and limits only, no live usage) on the returned record.
Response
200 - application/json
OK
Requested api-key. Raw token never included.
Show child attributes
Show child attributes
Was this page helpful?
⌘I