API Reference Overview
Base URL, Bearer auth, core endpoints, OpenAI-compatible request format, and response basics for the GonkaGate API.
Use the GonkaGate API at https://api.gonkagate.com/v1 with Authorization: Bearer gp-..., send generation requests to POST /v1/chat/completions, and refresh model IDs from GET /v1/models.
Requests use the OpenAI-compatible chat format and return either JSON or SSE. Need the first working request? Start with Quickstart.
API basics
- Base URL:
https://api.gonkagate.com/v1 - Auth:
Authorization: Bearer gp-... - Main generation endpoint:
POST /v1/chat/completions - Model list endpoint:
GET /v1/models - Non-streaming responses: JSON with
choicesandusage - Streaming responses: add
stream: trueand parse Server-Sent Events (SSE)
Request skeleton
Use this shape for any basic POST /v1/chat/completions call. Replace model with a fresh ID from GET /v1/models.
export GONKAGATE_API_KEY="gp-your-api-key"
curl https://api.gonkagate.com/v1/chat/completions \
-H "Authorization: Bearer $GONKAGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id-from-get-v1-models>",
"messages": [
{
"role": "user",
"content": "Reply with the word pong."
}
]
}'The minimum request is base URL, Bearer auth, a current model ID, and OpenAI-compatible messages.
Request rules
- Send JSON to
POST /v1/chat/completions. - Include
Authorization: Bearer gp-...andContent-Type: application/json. - Set
modelto a fresh ID fromGET /v1/models. - Send
messagesin the OpenAI-compatible chat format. - Add
stream: trueonly when your client already parses SSE.
Response and failure basics
- Non-streaming responses are JSON. Read the model output from
choices[0].message.content. - Streaming responses arrive as SSE
data:events and end with[DONE]. - Classify failures by
HTTP status + error.code, not status alone. - Keep
x-request-idwhen a request fails or behaves unexpectedly.
Common mistakes
- Using a stale model ID instead of refreshing it from
GET /v1/models. - Debugging auth, model selection, and request body shape at the same time. Check them in that order.
- Treating every
429as retryable throttling.insufficient_quotais a billing state, not a backoff case. - Treating this overview as the full schema. Exact request and response fields live on the endpoint reference pages.
See also
- Create a chat completion for the full
POST /v1/chat/completionsrequest schema, JSON vs SSE responses, error payloads, andx-idempotency-key. - GET /v1/models for current machine-readable model IDs.
- Streaming Responses for
stream: true, SSE parsing, and end-of-stream handling. - API Error Handling for retry, stop, and escalation rules.
- Authentication and API Keys if the Bearer header or key state is still in doubt.
Was this page helpful?