curl --request POST \
--url https://api.geekidea.ai/v1/organization/admin_api_keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "prod-server",
"credit_limit_usd": 50,
"expires_at": 123
}
'import requests
url = "https://api.geekidea.ai/v1/organization/admin_api_keys"
payload = {
"name": "prod-server",
"credit_limit_usd": 50,
"expires_at": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'prod-server', credit_limit_usd: 50, expires_at: 123})
};
fetch('https://api.geekidea.ai/v1/organization/admin_api_keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "key_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "organization.project.api_key",
"name": "<string>",
"redacted_value": "sk-gi-AbCd…",
"value": "<string>",
"project_id": "<string>",
"status": "active",
"credit_limit_usd": 123,
"used_usd": 123,
"created_at": 123,
"last_used_at": 123,
"expires_at": 123
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Create an admin API key
Creates an organization admin key (sk-gi-admin-…, only for /v1/organization/**); the plaintext value is returned once in this response.
curl --request POST \
--url https://api.geekidea.ai/v1/organization/admin_api_keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "prod-server",
"credit_limit_usd": 50,
"expires_at": 123
}
'import requests
url = "https://api.geekidea.ai/v1/organization/admin_api_keys"
payload = {
"name": "prod-server",
"credit_limit_usd": 50,
"expires_at": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'prod-server', credit_limit_usd: 50, expires_at: 123})
};
fetch('https://api.geekidea.ai/v1/organization/admin_api_keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "key_0192f1c3a7b87c3e9a4f5b6c7d8e9f01",
"object": "organization.project.api_key",
"name": "<string>",
"redacted_value": "sk-gi-AbCd…",
"value": "<string>",
"project_id": "<string>",
"status": "active",
"credit_limit_usd": 123,
"used_usd": 123,
"created_at": 123,
"last_used_at": 123,
"expires_at": 123
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Authorizations
Provide your API key in the Authorization header using Bearer auth
Body
Response
OK
API key (project inference key or organization admin key); the plaintext is returned only on creation
Key ID (key_ prefix)
"key_0192f1c3a7b87c3e9a4f5b6c7d8e9f01"
organization.project.api_key or organization.admin_api_key
"organization.project.api_key"
Name
Redacted key, e.g. sk-gi-AbCd…
"sk-gi-AbCd…"
Plaintext key, returned only on creation; store it safely
Project (null for admin keys)
Status: active / disabled / revoked
"active"
Spending limit (USD); null means unlimited
Amount used (USD)
Creation time (Unix seconds)
Last used time (Unix seconds)
Expiry time (Unix seconds); null means never
