Before you begin
Dane runs on Inferock Serve and is paid from your prepaid balance. Set up Inferock Serve first; it shows your gateway base URL with your Inferock key.
export GATEWAY_BASE_URL='paste-the-gateway-base-url-shown-at-activation'
export INFEROCK_KEY='your-issued-key'
Your first call
curl -sS "${GATEWAY_BASE_URL%/}/v1/chat/completions" \
-H "Authorization: Bearer ${INFEROCK_KEY}" \
-H 'Content-Type: application/json' \
-H 'x-governance-provider: inferock-serve' \
-d '{"model":"dane","messages":[{"role":"user","content":"Reply with one short sentence."}]}'
A successful request returns HTTP 200 with one answer in choices[0].message.content.
The same call in the Messages format:
curl -sS "${GATEWAY_BASE_URL%/}/v1/messages" \
-H "x-api-key: ${INFEROCK_KEY}" \
-H 'Content-Type: application/json' \
-H 'x-governance-provider: inferock-serve' \
-d '{"model":"dane","max_tokens":1024,"messages":[{"role":"user","content":"Reply with one short sentence."}]}'
Request fields
| Field | What it does |
|---|---|
model | dane. |
messages | The conversation, in the Chat Completions format. |
max_tokens | An integer up to 4,096 is accepted. A lower value lowers the balance a call needs to start. |
reasoning_effort | low (recommended), medium or high. Low effort is the default when none is named. |
stream | true sends the answer as server-sent events. |
tool_choice | "none" is accepted; any other value returns HTTP 400 with unsupported_parameter. |
tools | Function definitions are not supported for Dane; a request that sends tools returns HTTP 400 with unsupported_parameter. |
Other fields, such as temperature or top_p, return HTTP 400 with unsupported_parameter.
The response
Each call returns one answer.
choices[0].message.contentholds the answer.choices[0].finish_reasonisstoporlength.usage.prompt_tokensandusage.completion_tokensare the tokens billed at Dane's input and output prices.- With
stream: true, the answer arrives as server-sent events and the stream ends withdata: [DONE]. If the call fails after the stream starts, the last event carrieserrorinstead.
Limits
| Limit | Value |
|---|---|
| Context window | 1,000,000 tokens |
| Maximum output | 4,096 tokens |
| Input | Text |
| Output | Text |
| Effort levels | Low (recommended), Medium, High |
Hard questions can take several minutes.
Dane calls count toward your account's request, token and spend limits like any other call. See Limits.
Errors
| Status | error.code | Meaning | What to do |
|---|---|---|---|
400 | unsupported_parameter | The request sent a field Dane does not support. | Remove the field the error names. |
400 | invalid_request | The request is invalid. | Fix the request, then try again. |
402 | insufficient_balance | Your prepaid balance cannot cover the start of this request. | Add funds, or lower max_tokens, then try again. |
404 | model_not_available | Dane is not available for your account. | Make sure Inferock Serve is active; contact support if it is. |
413 | payload_too_large | The request is too large. | Shorten the conversation, then try again. |
429 | rate_limited | Retry after the limit resets. | Wait for the Retry-After delay when one is sent, then try again. |
429 | quota_exceeded | Retry after the quota resets. | See Limits. |
429 | spend_cap_exceeded | Retry after the spend cap resets. | See Limits. |
502 | answer_unavailable | The answer could not be produced. | Try once more; if it repeats, contact support with your request ID. |
503 | service_unavailable | Inferock Serve is temporarily unavailable. | Try again later. |
503 | policy_unavailable | Tenant limit policy is temporarily unavailable. | Try again later. |
503 | dane_unavailable | Dane is temporarily unavailable. Please retry shortly. | Try again shortly. |
504 | answer_timeout | The answer was not ready within the time limit. | Try again, or set a lower reasoning_effort. |
Account limit errors (413 with payload_too_large, 429 with rate_limited, quota_exceeded or spend_cap_exceeded, 503 with service_unavailable or policy_unavailable) work as described in Limits.