AI-API

Klok AI-API

OpenAI-compatible chat API for Klok Integration models. Use it from OpenCode, the OpenAI SDK, or any client that speaks POST /v1/chat/completions.

You send an API_TOKEN and pick a model. Start with Kloker. Use Architect or Developer when the answer should follow how you already integrate.

Kloker is Klok's house model. We pick an open source model, try it with Klok skills and MCPs, and only then put it on the API. Today that model is DeepSeek V4 Flash 0731. When a better one shows up, we switch.

Skills are extra instructions. MCPs are extra tools the agent can call. The platform team checks that Kloker works well with our specific set of instructions, tools and utilities.

We use this same service ourselves to write documentation, model data, and build integrations. You call it like OpenAI, so you can plug it into your own agents or extend the Klok agent flow.

Two model types

Kloker

Everyday model

Cheap, and it starts blank. Your systems are not pre-loaded. Klok chooses the open source model behind it and tests it with our skills and MCPs. Current pick: DeepSeek V4 Flash 0731.

We also add vision. If the request has an image, Qwen 3.8 describes it first. Kloker then gets your question plus that description.

API model: Kloker

Environment and Klok best practices

Architect and Developer

These models know your integration environment and Klok best practices. Architect is opinionated about structure. Developer is opinionated about implementation.

  • Server-side tools for ecosystem lookup. The client does not execute extra tool_calls for those.
  • A system-prompt injection that steers answers toward Klok integration best practices: data contracts, CloudEvents, event-driven flows.

The gateway appends that injection. It does not drop a client role: system message. OpenCode sends its own agent instructions and tools. Those still have to reach the model.

API modelOpenCode IDType
Klokerklokintegration/KlokerEveryday model
Kloker-Integration-Architectklokintegration/Kloker-Integration-ArchitectEnvironment and Klok best practices
Kloker-Integration-Developerklokintegration/Kloker-Integration-DeveloperEnvironment and Klok best practices

Endpoint

Base URL:

https://api-gw.klok.ipaas.se/proxy/kloker-key/v1
MethodPathPurpose
POST/chat/completionsChat completions (OpenAI shape)
GET/modelsList models, if enabled on the key

Authentication

Already on klokintegration.se? Create API keys there. You do not wait for us.

Not on the platform yet? Email klokintegration@integrera.com and ask for a token.

Send the token as a Bearer header. OpenCode and the OpenAI SDK do the same:

Authorization: Bearer $API_TOKEN

The same token is accepted as:

x-api-key: $API_TOKEN

Do not commit tokens. Rotate a key if it has been pasted into a client screenshot or chat.

Chat completions

curl https://api-gw.klok.ipaas.se/proxy/kloker-key/v1/chat/completions \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Kloker",
    "messages": [
      {"role": "user", "content": "What does Klok Integration do?"}
    ]
  }'

OpenCode

Set API_TOKEN. After the models.dev catalog ships, /connect lists klokintegration.se. Until then, use the provider block in examples/opencode.jsonc.

Pricing

Usage is billed per million tokens, excl. VAT. Input is €0.20. Output is €1.

WhoInputOutput
Token by email€0.20 / M€1 / M
klokintegration.se customerIncluded€1 / M

Platform customers create keys in the product and are charged for the model's reply, not for the prompt they send.