Indicia Code.

Quickstart

Get a token and send your first request.

Get a token

Ask an admin for a token. Admins create tokens in the dashboard under Gebruikers, then your user, then Token. The token is shown once and looks like ic_ followed by 43 characters. Export it in your shell:

Terminal
export INDICIA_TOKEN="ic_..."

If you use indicia code, you already have a personal token in ~/.indicia/config.json.

Send a request

Call /v1/chat/completions with curl or the OpenAI SDK.

Terminal
curl https://code.test.indicia-ai.com/v1/chat/completions \
  -H "Authorization: Bearer $INDICIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "indicia/snel",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

The response is a chat.completion object:

Response
{
  "id": "chatcmpl-72d16bc1-e432-4eba-9d46-c64d93bfe92b",
  "object": "chat.completion",
  "created": 1791897901,
  "model": "indicia/snel",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "Hello!"},
      "finish_reason": "stop"
    }
  ],
  "usage": {"prompt_tokens": 8, "completion_tokens": 6, "total_tokens": 14}
}

Use the Anthropic SDK

The same token works with the Anthropic SDK on /v1/messages.

Terminal
pip install anthropic
hello.py
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://code.test.indicia-ai.com",
    api_key=os.environ["INDICIA_TOKEN"],
)

message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Say hello"}],
)
print(message.content[-1].text)

Base URLs differ per SDK

The OpenAI SDK takes the base URL with /v1. The Anthropic SDK adds /v1 itself, so give it the bare host.

Next steps

On this page