← Back to chat

CAISI guide

Chat on the web and in the CrypTok app, tag @caisi, or plug it into VS Code, JetBrains, Cursor, Zed, the terminal and your own apps. One model, CAISI by CrypTok, running on CrypTok's own GPU: it writes code, reads images, calls tools and searches the web.

Base URL: https://cryptok.ai/v1Model: caisiAuth: Authorization: Bearer cak_…Get a key →

Ways to use it

All of these share one daily allowance per CrypTok account.

Daily limits

Allowances refill on a rolling 24 hours, not at midnight. A token is about ¾ of a word; each request counts everything it sends (the conversation, files and instructions an editor attaches) plus the answer.

AccountTokens / dayImages / dayAPI keys
Guest (not signed in)3 messages——
Free CrypTok account150K3✓
CAISI Pro ($29/mo · $78/3 mo · $290/yr; included with Degen and Killer Whale)1.5M30✓
CrypTok moderators and adminsUnlimitedUnlimited✓

API keys also allow 20 requests a minute and 2 at a time per account, because one GPU serves everyone. A plain chat message uses about 5,000 tokens, so the free allowance is roughly 26 chats a day; coding agents (Cline, agent mode) send 10–20K tokens per step.

Save tokens: start a new chat when the topic changes, attach only the files that matter, and keep editor tab-autocomplete on another engine.

Get an API key

  1. Open cryptok.ai/keys and sign in with your CrypTok account (free to create at cryptok.me).
  2. Name the key (e.g. “VS Code”) and press New key. Copy it: it starts with cak_ and is shown only once.
  3. Paste it into your editor (next section). Up to 10 keys per account; revoke any key on the same page the moment it leaks.
text
cak_<keyId16>.<secret32>
e.g. cak_a17c07022795d3a3.177a41a921924696175292845bbbdf35
     └ public id ┘ └ secret (stored only as a hash) ┘

VS Code, JetBrains, Cursor, Zed and the terminal

Every tool needs the same three things: Base URL https://cryptok.ai/v1, your API key, and model caisi. Pick “OpenAI compatible” wherever a tool asks for the provider. The keys page shows these snippets with your key filled in.

VS Code / JetBrains · Continue

  1. Install the Continue extension (VS Code Marketplace, or the Continue plugin in JetBrains IDEs).
  2. Open Continue → the gear (settings) → "Open config file" (config.yaml).
  3. Add this model under models:, save, and pick "CAISI" in the model menu.
yaml
models:
  - name: CAISI
    provider: openai
    model: caisi
    apiBase: https://cryptok.ai/v1
    apiKey: cak_YOUR_KEY
    roles:
      - chat
      - edit
      - apply
    capabilities:
      - tool_use
      - image_input

VS Code · Cline, Roo Code, Kilo Code

  1. Open the extension's settings (the gear in its panel).
  2. API Provider: "OpenAI Compatible".
  3. Base URL: https://cryptok.ai/v1 · API Key: your key · Model ID: caisi.
  4. Optional: context window 65536, and tick "Supports images".
text
API Provider:  OpenAI Compatible
Base URL:      https://cryptok.ai/v1
API Key:       cak_YOUR_KEY
Model ID:      caisi

VS Code · Copilot Chat (built-in models)

  1. Run "Chat: Manage Language Models" from the Command Palette (Ctrl+Shift+P).
  2. Add a provider: "OpenAI Compatible" (called "Custom Endpoint" in newer VS Code).
  3. Base URL https://cryptok.ai/v1, your key, then pick caisi from the list it loads.
text
Provider:  OpenAI Compatible  (or "Custom Endpoint")
Base URL:  https://cryptok.ai/v1
API key:   cak_YOUR_KEY
Model:     caisi

Cursor

  1. Settings → Models → turn on "OpenAI API Key" and paste your key.
  2. Turn on "Override OpenAI Base URL" and enter https://cryptok.ai/v1.
  3. Add a custom model named caisi and select it in chat.
text
OpenAI API Key:            cak_YOUR_KEY
Override OpenAI Base URL:  https://cryptok.ai/v1
Custom model:              caisi

Zed

  1. Open settings.json (Zed → Settings) and add the provider below.
  2. Paste your key when the Agent panel asks for the CrypTok provider's key.
json
"language_models": {
  "openai_compatible": {
    "CrypTok": {
      "api_url": "https://cryptok.ai/v1",
      "available_models": [
        {
          "name": "caisi",
          "display_name": "CAISI",
          "max_tokens": 65536,
          "capabilities": { "tools": true, "images": true, "parallel_tool_calls": false, "prompt_cache_key": false }
        }
      ]
    }
  }
}

Terminal · Aider and any OpenAI tool

  1. Aider (pair programming in the terminal): pip install aider-chat, then run it with the flags below.
  2. Most other tools read the two standard environment variables: set them once and pick model caisi.
bash
# Aider
aider --openai-api-base https://cryptok.ai/v1 --openai-api-key cak_YOUR_KEY --model openai/caisi

# Any OpenAI-compatible tool (macOS/Linux; on Windows use: setx NAME "value")
export OPENAI_BASE_URL=https://cryptok.ai/v1
export OPENAI_API_KEY=cak_YOUR_KEY

Test it · curl

  1. Paste into a terminal. You should get a short answer back.
bash
curl https://cryptok.ai/v1/chat/completions \
  -H "Authorization: Bearer cak_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"caisi","messages":[{"role":"user","content":"Say hi in five words"}]}'

Use CAISI for chat, edits and agent mode. Tab-autocomplete fires on every pause in your typing and would spend the allowance in minutes.

POST /v1/chat/completions

The OpenAI Chat Completions API. Stateless: send the whole conversation each time.

json
{
  "model": "caisi",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Write a Python function that checks if a string is a palindrome."}
  ],
  "temperature": 0.5,
  "max_tokens": 800,
  "stream": false
}
FieldNotes
modelOptional. Every request runs on caisi; any id is accepted (older ids such as cryptok-lumen keep working).
messagesRoles system/developer, user, assistant (with tool_calls), tool. Content may be a string or parts (text, image_url).
streamServer-sent events in OpenAI chunk format; add "stream_options": {"include_usage": true} for a final usage chunk.
max_tokens / max_completion_tokensAnswer length cap (default 8,192, max 32,768).
temperature, top_p, stop, seedAs in OpenAI.
tools, tool_choiceFunction calling (see below). tool_choice: "none" turns tools off.
response_formatjson_object or json_schema.
n, logprobs, penaltiesNot supported (always one answer).

Response

json
{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "created": 1793990400,
  "model": "caisi",
  "choices": [{
    "index": 0,
    "message": {"role": "assistant", "content": "def is_palindrome(s: str) -> bool: …"},
    "finish_reason": "stop"
  }],
  "usage": {"prompt_tokens": 41, "completion_tokens": 96, "total_tokens": 137}
}

GET /v1/models

Lists the one model (caisi, 64K context, vision and tools). Editors call it to check the key; it is free.

Streaming

bash
curl -N https://cryptok.ai/v1/chat/completions \
  -H "Authorization: Bearer $CRYPTOK_AI_KEY" -H "Content-Type: application/json" \
  -d '{"model":"caisi","stream":true,"messages":[{"role":"user","content":"Explain Solana validators in 3 lines"}]}'

data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":""}}]}
data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Validators"}}]}
…
data: {"id":"chatcmpl-…","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]

Lines starting with : are keep-alives sent while the model warms up; SSE clients ignore them.

Tools (function calling) and JSON

Pass OpenAI-style tools; when the model wants one it answers with tool_calls and finish_reason: "tool_calls". Run the tool, append a {"role":"tool","tool_call_id":…,"content":…} message and call again. This is what agent modes in Continue, Roo Code and Copilot Chat use.

json
"tools": [{
  "type": "function",
  "function": {
    "name": "get_price",
    "description": "Current USD price of a token",
    "parameters": {"type": "object", "properties": {"symbol": {"type": "string"}}, "required": ["symbol"]}
  }
}]

For guaranteed JSON, send "response_format": {"type": "json_object"} (and say “answer in JSON” in the prompt), or a json_schema.

Sending images

CAISI reads screenshots, charts and photos. Send them as base64 data URLs (up to 8 per request, 8 MB each); links to other websites are not fetched. Each image counts as about 600 tokens.

json
{"role": "user", "content": [
  {"type": "text", "text": "What's wrong with this chart?"},
  {"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBORw0KGgo…"}}
]}

POST /v1/images/generations

Makes one 1024×1024 image (about 20–40 seconds) and counts against your daily images.

bash
curl https://cryptok.ai/v1/images/generations \
  -H "Authorization: Bearer $CRYPTOK_AI_KEY" -H "Content-Type: application/json" \
  -d '{"prompt":"a neon cat astronaut, digital art","response_format":"url"}'

{"created": 1793990400, "data": [{"url": "https://cdn.cryptok.ai/…png", "revised_prompt": "a neon cat astronaut, digital art"}]}

response_format: "b64_json" returns the image inline. n must be 1; size is ignored. While the picture renders the response sends a space every few seconds to keep the connection open (JSON parsers skip them); give your HTTP client a timeout of at least 2 minutes.

Response headers

HeaderMeaning
X-CrypTok-AI-PlanFree, CAISI Pro or Staff
X-CrypTok-AI-Tokens-Used / -Tokens-CapTokens used in the last 24 hours before this request / your daily cap (unlimited for staff)
X-CrypTok-AI-Images-Used / -Images-CapThe same for images
x-ratelimit-limit-tokens / x-ratelimit-remaining-tokensOpenAI-style copies of the token numbers
Retry-AfterSeconds to wait (on 429 rate and 503)
X-Request-IdQuote it when asking for help

Errors

OpenAI-shaped: {"error": {"message": "…", "type": "…", "code": "…"}}.

HTTPtype / codeWhenWhat to do
400invalid_request_error
—
The body is not JSON, has no user message, an image is not a data URL, or a field is invalid.Read error.message; it names the problem.
401invalid_request_error
invalid_api_key
No key, a malformed key, or a revoked key.Send Authorization: Bearer cak_… Make a new key at cryptok.ai/keys.
429insufficient_quota
daily_tokens
Today's token allowance is used up, or this request is bigger than what is left.Wait for the rolling 24-hour refill, send less context, or get CAISI Pro.
429insufficient_quota
daily_images
Today's images are used up.Wait for the refill or get CAISI Pro.
429requests
rate_per_minute
Too many requests a minute, or more than 2 at once.Wait the seconds in the Retry-After header.
502server_error
engine_unavailable
The GPU engine is restarting or overloaded.Retry after a few seconds.
503server_error
gpu_busy
The image GPU is busy.Retry after Retry-After seconds.

SDK examples

Python (openai)

python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://cryptok.ai/v1", api_key=os.environ["CRYPTOK_AI_KEY"])
reply = client.chat.completions.create(
    model="caisi",
    messages=[{"role": "user", "content": "Summarize what a liquidity pool is in two sentences."}],
)
print(reply.choices[0].message.content)

# streaming
stream = client.chat.completions.create(model="caisi", stream=True,
                                        messages=[{"role": "user", "content": "Count to five."}])
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Node.js / TypeScript (openai)

typescript
// npm install openai
import OpenAI from 'openai';

const client = new OpenAI({ baseURL: 'https://cryptok.ai/v1', apiKey: process.env.CRYPTOK_AI_KEY });
const reply = await client.chat.completions.create({
  model: 'caisi',
  messages: [{ role: 'user', content: 'Give me a regex for a Solana address.' }],
});
console.log(reply.choices[0].message.content);

Older endpoint

POST https://cryptok.ai/api/v1/chat (plain-text streaming) still works for existing apps and shares the same allowance. Use /v1 for anything new.

FAQ

Is it really free?

Yes, within the daily allowance above, with any CrypTok account. CAISI Pro raises it 10×.

Is my code stored?

API requests are not saved as chats. We keep usage records (token and image counts, sizes and times) to enforce the allowance. Chats on cryptok.ai itself are saved to your account so you can reopen them.

Why did I get a 429 after one big request?

A request that would go past what is left of today's tokens is refused up front. Send fewer files, start a new chat, or wait for the refill.

How do I check my usage?

On cryptok.ai/keys, in the account menu on cryptok.ai, or in the X-CrypTok-AI-Tokens-* headers of any API response.