Documentation

Agentic tool settings

Agentic tools send file contents, command output, and the whole conversation history at every step. A prompt that large can take tens of seconds before the first token arrives. If your app gives up first, the request still counts but you receive nothing. Set timeout, streaming, retries, and context size as shown below.

Why this matters

  • Requests cut off before the response arrives still count. As soon as a request arrives, the AI server starts processing the whole prompt. If your app drops it first (timeout, stop button, lost connection), the processing cost has already been incurred, but you get no response.
  • Huge prompts need more than 30 seconds before the first token. Agentic prompts of hundreds of KB with thousands of messages can exceed many apps’ default limit (30 or 60 seconds) before a single token comes out.
  • Streaming keeps the connection alive. With streaming on, our server sends the headers right away and then a keepalive signal every 10 seconds while waiting for the response. What can still cut it off is your app’s total time limit, so set it to at least 300 seconds.
  • Pick a fast model for large contexts. For long sessions or big repos, use a faster model and keep large models for the steps that really need them. Compare them on the Pricing page.

Guidelines for every tool

Timeout
At least 300 seconds. Watch the unit: some tools use seconds (300), others milliseconds (300000).
Streaming
Turn it on. Without streaming, no data flows until the response is complete, so proxies and apps give up sooner.
Retries
Keep them low (0–3). A retry after a timeout is a new request that is also charged. Fix the timeout first instead of raising retries.
Context
Keep it small. Use automatic compact/summarize, start a new session per task, and exclude large folders (node_modules, build, data).

Claude Code

Base URL & key
Follow the Claude Code guide: ANTHROPIC_BASE_URL = https://ai.geraikita.com (without /v1) and ANTHROPIC_AUTH_TOKEN = your gk- key. You can put the variables in the env block of ~/.claude/settings.json.
Timeout
API_TIMEOUT_MS (milliseconds): how long each attempt waits for response headers, default 600000 (10 minutes). Don’t lower it; if you ever reduced it, set it back to at least 300000.
Streaming
Always streams. There is no setting to turn it off.
Retries
CLAUDE_CODE_MAX_RETRIES, default 10, including timeouts before the response starts streaming. For large prompts set 2–3 so one step isn’t charged over and over.
Context
/compact summarizes the conversation, /clear starts a new one. Auto-compact is on by default (autoCompactEnabled); a lower CLAUDE_AUTOCOMPACT_PCT_OVERRIDE (e.g. 60) compacts earlier.
~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://ai.geraikita.com",
    "ANTHROPIC_AUTH_TOKEN": "gk-xxxxxxxx",
    "API_TIMEOUT_MS": "600000",
    "CLAUDE_CODE_MAX_RETRIES": "3",
    "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "60"
  }
}

Cline

Base URL & key
Follow the Cline guide: provider OpenAI Compatible (Base URL https://ai.geraikita.com/v1) or Anthropic with Use custom base URL https://ai.geraikita.com.
Timeout
Cline’s official docs offer no timeout setting for the OpenAI Compatible or Anthropic providers (Request Timeout is for Ollama only). To get the first token out fast: shrink the context and pick a faster model for large contexts.
Streaming
No streaming setting in the official docs; nothing to change.
Retries
No retry setting in the official docs.
Context
Auto Compact summarizes automatically when the context is nearly full. /smol (alias /compact) summarizes manually, /newtask carries a summary into a new task. Set Context Window size in Model Configuration to match the model.

Roo Code

Base URL & key
Note: the Roo Code extension was officially shut down on 15 May 2026. If you still use it: provider OpenAI Compatible, Base URL https://ai.geraikita.com/v1, your gk- key (same as Cline).
Timeout
roo-cline.apiRequestTimeout in VS Code settings.json, in seconds (default 600, range 0–3600, 0 = no limit). Don’t go below 300.
Streaming
Make sure Enable streaming stays checked in the OpenAI Compatible profile.
Retries
With Auto-Approve on, failed requests are retried automatically with growing delays; there is no separate toggle.
Context
Intelligent Context Condensing (Settings → Context): lower the threshold from the default 100% so condensing starts earlier, or press Condense Context. Exclude large folders with .rooignore.

Kilo Code

Base URL & key
Settings → Providers → Custom provider → OpenAI Compatible, Base URL https://ai.geraikita.com/v1, your gk- key. Or use the ~/.config/kilo/kilo.jsonc file as in the example below.
Timeout
options.timeout on the provider (milliseconds) covers the wait for headers and the first byte. The default is 300000, right at the limit; set 600000. Don’t set chunkTimeout too low.
Streaming
No streaming setting in the official docs; nothing to change.
Retries
No retry setting in the official docs.
Context
compaction.auto (default true) and /compact. You must set limit.context per model (a smaller number compacts earlier): without it auto-compaction doesn’t run. Exclude large folders with .kilocodeignore or permission rules.
~/.config/kilo/kilo.jsonc
{
  "provider": {
    "geraikita": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Geraikita AI",
      "options": {
        "baseURL": "https://ai.geraikita.com/v1",
        "apiKey": "gk-xxxxxxxx",
        "timeout": 600000
      },
      "models": {
        "claude-sonnet-5": {
          "name": "Claude Sonnet 5",
          "limit": { "context": 128000, "output": 16000 }
        }
      }
    }
  },
  "compaction": { "auto": true }
}

Cursor

Base URL & key
Cursor Settings → Models → OpenAI API key. Cursor’s official docs don’t describe a custom base URL; if your Cursor version shows Override OpenAI Base URL, enter https://ai.geraikita.com/v1. Your own API key only works for chat models (Tab keeps Cursor’s built-in models), and requests go through Cursor’s servers.
Timeout
No adjustable timeout setting in the official docs. Instead: shrink the context, start a new chat per task, and pick a fast model so the first token arrives before the app’s limit.
Streaming
Handled by Cursor; no setting.
Retries
No retry setting in the official docs.
Context
Cursor automatically summarizes older parts of the conversation when the context is nearly full. Start a new chat whenever you switch tasks, and exclude large files with .cursorignore.

OpenCode

Base URL & key
Follow the OpenCode guide: provider @ai-sdk/openai-compatible with baseURL https://ai.geraikita.com/v1.
Timeout
In provider.geraikita.options (milliseconds): headerTimeout (wait for headers, default 300000) and chunkTimeout (gap between stream chunks, default 300000). timeout (overall limit) is off by default; if you set it, use at least 300000.
Streaming
Always streams. There is no setting to turn it off.
Retries
No retry setting in the official docs. If requests keep dropping, fix the timeout and shrink the context.
Context
compaction.auto (default true) summarizes the session automatically when the context is full. /compact summarizes manually, /new starts a new session.
~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "geraikita": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://ai.geraikita.com/v1",
        "apiKey": "{env:GERAIKITA_API_KEY}",
        "headerTimeout": 300000,
        "chunkTimeout": 300000
      }
    }
  },
  "compaction": { "auto": true }
}

Continue

Base URL & key
In config.yaml: provider: openai, apiBase: https://ai.geraikita.com/v1, apiKey = your gk- key.
Timeout
requestOptions.timeout in seconds (default 7200). Use at least 300, not 300000.
Streaming
The openai provider always streams.
Retries
No retry setting in the official docs.
Context
defaultCompletionOptions.contextLength and maxTokens cap the context and response size. Start a new chat per task; the Continue CLI has /compact and /clear.
~/.continue/config.yaml
models:
  - name: Claude Sonnet 5 (Geraikita)
    provider: openai
    model: claude-sonnet-5
    apiBase: https://ai.geraikita.com/v1
    apiKey: gk-xxxxxxxx
    requestOptions:
      timeout: 600        # seconds, not milliseconds
    defaultCompletionOptions:
      contextLength: 64000  # smaller = history gets trimmed
      maxTokens: 8192

n8n

Base URL & key
OpenAI credentials: set Base URL to https://ai.geraikita.com/v1 and your gk- API key. Anthropic credentials: Base URL https://ai.geraikita.com.
Timeout
OpenAI Chat Model node → Options → Timeout (milliseconds). The default is 60000 (60 seconds), a common cause of cuts at 60 seconds; set at least 300000. The HTTP Request node → Options → Timeout is also in milliseconds. Self-hosted: don’t set EXECUTIONS_TIMEOUT (seconds) lower than that.
Streaming
AI Agent → Options → Enable Streaming (on by default; needs a Chat Trigger or a Webhook with Response Mode Streaming). Anthropic Chat Model → Stream Responses. The OpenAI Chat Model has no streaming option, so rely on a long enough Timeout.
Retries
OpenAI Chat Model → Options → Max Retries, default 2. Retries after a timeout are charged too; fix the Timeout first.
Context
Simple Memory sub-node → Context Window Length = how many past interactions are sent. Keep it small, e.g. 5–10.

OpenAI SDK (Python & Node.js)

Base URL & key
base_url / baseURL = https://ai.geraikita.com/v1, api_key / apiKey = your gk- key. A basic example is in First request.
Timeout
timeout: seconds in Python, milliseconds in Node.js. The SDK default is 10 minutes, which is fine as long as you don’t lower it below 300 seconds.
Streaming
stream=True (Python) / stream: true (Node.js).
Retries
max_retries / maxRetries, default 2, including retrying requests that time out. For large prompts set 0–1.
Context
Send only the history you need: trim old messages or summarize them before sending.
from openai import OpenAI

client = OpenAI(
    base_url="https://ai.geraikita.com/v1",
    api_key="gk-xxxxxxxx",
    timeout=600.0,   # seconds
    max_retries=1,   # retries after a timeout are charged too
)
stream = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Halo!"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Anthropic SDK (Python & Node.js)

Base URL & key
base_url / baseURL = https://ai.geraikita.com (without /v1, the SDK adds /v1/messages itself), api_key / apiKey = your gk- key.
Timeout
timeout: seconds in Python, milliseconds in Node.js; default 10 minutes. The SDK refuses non-streaming requests expected to take longer than about 10 minutes, so use streaming.
Streaming
client.messages.stream(...), or stream=True / stream: true on messages.create.
Retries
max_retries / maxRetries, default 2. For large prompts set 0–1.
Context
Send only the history you need; cap max_tokens to what the response needs.
import anthropic

client = anthropic.Anthropic(
    base_url="https://ai.geraikita.com",   # without /v1
    api_key="gk-xxxxxxxx",
    timeout=600.0,   # seconds
    max_retries=1,   # retries after a timeout are charged too
)
with client.messages.stream(
    model="claude-sonnet-5",
    max_tokens=4096,
    messages=[{"role": "user", "content": "Halo!"}],
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

curl

Base URL & key
Header Authorization: Bearer gk-... to https://ai.geraikita.com/v1/chat/completions. A basic example is in First request.
Timeout
Without --max-time curl doesn’t limit the total duration. If you use it, set at least 300 (seconds).
Streaming
"stream": true in the body, plus -N (--no-buffer) so response chunks show up immediately.
Retries
--retry defaults to 0 and also retries on timeouts. Don’t add it for large prompts.
Context
You build the body yourself: send only the messages you need.
bash
curl https://ai.geraikita.com/v1/chat/completions \
  --max-time 600 -N \
  -H "Authorization: Bearer gk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5","stream":true,"messages":[{"role":"user","content":"Halo!"}]}'

Billing terms

Requests cancelled on the buyer’s side (app timeout, stop button, dropped connection) before the response arrives are still charged. Empty output is compensated only for problems on our side (an empty response or error from the server, or no output for ≥60 seconds). Applies from 1 November 2026.

Terms & Conditions, Article 10

FAQ

My app timed out and the output was empty. Am I still charged?

Yes, if your app cut it off before the response arrived: the AI server had already processed your prompt. This is set out in the Terms & Conditions and applies from 1 November 2026.

When is empty output compensated?

When the problem is on our side: the server returns an empty response or an error, or there is no output at all for 60 seconds or more.

Why not just raise the retries?

Every retry is a new request. If the cause is a timeout that’s too short, retries only repeat the charge with no result. Raise the timeout to at least 300 seconds and turn on streaming.

My prompt is huge. What helps most?

Summarize or start a new session, exclude large folders, and use a faster model for large contexts. Compare models on the Pricing page.