API Reference
OpenAPI: Admin API pelanggan
Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/organizations/me"{ "id": "01JABCD1234EFGH5678JKLMNP", "type": "organization", "name": "Budi"}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Query Parameters
Value in
- "active"
- "inactive"
1 <= value <= 100020ID kunci — mulai setelahnya.
Value in
- "asc"
- "desc"
Response Body
application/json
curl -X GET "https://example.com/v1/organizations/api_keys"{ "data": [ { "id": "01JABCD1234EFGH5678JKLMNP", "type": "api_key", "name": "kunci-ci", "workspace_id": "wrkspc_default", "created_at": "2026-09-01T00:00:00Z", "created_by": { "id": "01JUSER1234EFGH5678JKLMNP", "type": "user" }, "partial_key_hint": "sk-ngd-Ab3X9", "status": "active" } ], "has_more": false, "first_id": "01JABCD1234EFGH5678JKLMNP", "last_id": "01JABCD1234EFGH5678JKLMNP"}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/organizations/api_keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "01JABCD1234EFGH5678JKLMNP", "type": "api_key", "name": "kunci-ci", "workspace_id": "wrkspc_default", "created_at": "2026-09-01T00:00:00Z", "created_by": { "id": "01JUSER1234EFGH5678JKLMNP", "type": "user" }, "partial_key_hint": "sk-ngd-Ab3X9", "status": "active", "key": "sk-ngd-Ab3X9qW7eR2tY6uI4oP8sD1fG5hJ0kL3mN"}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/organizations/api_keys/string"{ "id": "string", "type": "api_key", "name": "string", "workspace_id": "wrkspc_default", "created_at": "2019-08-24T14:15:22Z", "created_by": { "id": "string", "type": "user" }, "partial_key_hint": "string", "status": "active"}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/organizations/api_keys/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "type": "api_key", "name": "string", "workspace_id": "wrkspc_default", "created_at": "2019-08-24T14:15:22Z", "created_by": { "id": "string", "type": "user" }, "partial_key_hint": "string", "status": "active"}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Query Parameters
ISO 8601 (YYYY-MM-DD atau unix juga diterima). Default 7 hari lalu.
date-timeDefault sekarang.
date-time"1d"Value in
- "1d"
- "1h"
Bisa diulang atau koma (group_by[]= juga diterima).
Saring model (bisa diulang/koma; alias models[], model_ids).
Saring kunci (alias api_key_ids[], api_key_id).
Jumlah bucket per halaman.
1 <= value <= 1000201 <= value1Response Body
application/json
curl -X GET "https://example.com/v1/organizations/usage_report/messages"{ "data": [ { "starting_at": "2026-09-28T00:00:00Z", "ending_at": "2026-09-29T00:00:00Z", "results": [ { "uncached_input_tokens": 1200, "cache_read_input_tokens": 800, "cache_creation": { "ephemeral_5m_input_tokens": 0, "ephemeral_1h_input_tokens": 0 }, "output_tokens": 300, "server_tool_use": { "web_search_requests": 0 }, "model": "claude-haiku-4-5", "workspace_id": "wrkspc_default", "service_tier": "standard", "context_window": 200000 } ] } ], "has_more": false, "next_page": null}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Query Parameters
date-timedate-timeBentuk group_by[]=description juga diterima.
Value in
- "description"
Saring model (bisa diulang/koma).
Response Body
application/json
curl -X GET "https://example.com/v1/organizations/cost_report"{ "results": [ { "currency": "IDR", "amount": "15000", "credits": "150", "description": "claude-haiku-4-5 tokens", "cost_type": "tokens", "model": "claude-haiku-4-5", "token_type": "all", "service_tier": "standard" } ]}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/organization/projects"{ "object": "list", "data": [ { "id": "proj_default", "object": "organization.project", "name": "Default", "created_at": 1756684800, "status": "active" } ]}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Query Parameters
1 <= value <= 1000020Response Body
application/json
curl -X GET "https://example.com/v1/organization/projects/proj_default/api_keys"{ "object": "list", "data": [ { "object": "organization.project.api_key", "id": "01JABCD1234EFGH5678JKLMNP", "name": "kunci-ci", "redacted_value": "sk-ngd-Ab3X9...", "created_at": 1756684800, "last_used_at": null, "owner": { "type": "user" } } ], "first_id": "01JABCD1234EFGH5678JKLMNP", "last_id": "01JABCD1234EFGH5678JKLMNP", "has_more": false}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/organization/projects/proj_default/api_keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "object": "organization.project.api_key", "id": "string", "name": "string", "redacted_value": "string", "created_at": 0, "last_used_at": 0, "owner": { "type": "user" }, "value": "string"}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/organization/projects/proj_default/api_keys/string"{ "object": "organization.project.api_key", "id": "string", "name": "string", "redacted_value": "string", "created_at": 0, "last_used_at": 0, "owner": { "type": "user" }}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/v1/organization/projects/proj_default/api_keys/string"{ "object": "organization.project.api_key.deleted", "id": "01JABCD1234EFGH5678JKLMNP", "deleted": true}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Query Parameters
Unix detik (ISO/YYYY-MM-DD juga diterima). Default 7 hari lalu.
"1d"Value in
- "1d"
- "1h"
1 <= value <= 10000201 <= value1Response Body
application/json
curl -X GET "https://example.com/v1/organization/usage/completions"{ "object": "page", "data": [ { "object": "bucket", "start_time": 1756684800, "end_time": 1756771200, "results": [ { "object": "organization.usage.completions.result", "input_tokens": 2000, "input_cached_tokens": 800, "output_tokens": 300, "num_model_requests": 5, "model": "gpt-6-luna", "api_key_id": "01JABCD1234EFGH5678JKLMNP", "project_id": "proj_default", "batch": false } ] } ], "has_more": false, "next_page": null}Authorization
adminBearerAuth Kunci Admin API pelanggan sk-adm-ngd-…. TIDAK berlaku untuk inference; kunci inference tidak berlaku di Admin API.
In: header
Query Parameters
Value in
- "1d"
Value in
- "line_item"
Response Body
application/json
curl -X GET "https://example.com/v1/organization/costs"{ "results": [ { "object": "organization.costs.result", "amount": { "value": 15000, "currency": "idr" }, "credits": "150", "line_item": "gpt-6-luna tokens", "project_id": "proj_default" } ]}