Documentation
Quickstart guide and API reference for codecrack.dev gateway.
# Quickstart
- Get access — request an invite at
/waitlistand wait for approval. - Create an API key — go to
/dashboard/keysand generate a new key. Copy it immediately. - Make a request — use any OpenAI-compatible SDK or CLI:
from openai import OpenAI
client = OpenAI(
base_url="https://api.codecrack.dev/v1",
api_key="cc_live_your_key_here"
)
response = client.chat.completions.create(
model="hermes-agent",
messages=[{"role": "user", "content": "Halo, kerjain apa hari ini?"}],
)
print(response.choices[0].message.content)# API Reference
POST
/v1/chat/completionsCreate a chat completion. 100% OpenAI-compatible request/response format.
Headers
Authorization: Bearer cc_live_...
Content-Type: application/json
Body
{
"model": "hermes-agent",
"messages": [
{"role": "user", "content": "your message"}
],
"stream": true
}Notes
modelis always overridden tohermes-agent- Streaming responses use Server-Sent Events (SSE)
- Minimum ~6.6k prompt tokens per request (system prompt)
GET
/v1/modelsList available models. Returns a single model: hermes-agent.
{
"object": "list",
"data": [
{
"id": "hermes-agent",
"object": "model",
"owned_by": "codecrack"
}
]
}GET
/healthHealth check endpoint. Returns upstream Hermes status.
# Error Codes
| Code | Type | Meaning |
|---|---|---|
| 401 | invalid_api_key | Key missing, malformed, or revoked |
| 402 | insufficient_credit | Balance is zero or negative |
| 403 | account_suspended | Account not approved or suspended |
| 400 | invalid_request_error | Malformed request body |
# Authentication
All API requests require a Bearer token in the Authorization header. Keys follow the format:
cc_live_<32 alphanumeric characters>Generate keys from your dashboard. Keys are shown once at creation — store them securely.