PL Log inOpen Studio
Preview version. Model catalog, prices, calculator and docs are live. Generation goes live at launch.

Quickstart

Docs: every page

This walkthrough gets you from an empty account to a chat answer and a finished image. A single Kadraris key and a single prepaid balance cover chat, image, video and audio models, so nothing else needs to be set up along the way.

All endpoints live under one base URL:

text
https://kadraris.com/v1

Step 1: account and API key

  1. Register, then add funds (the smallest top-up is $10, details in Billing).
  2. In the dashboard, open the API keys section and generate a key.
  3. Copy it before closing the dialog. The key starts with sk-kd-, has 32 more characters after the prefix, and is displayed a single time.

Put the key in an environment variable instead of pasting it into source files:

bash
export KADRARIS_API_KEY="sk-kd-..."
powershell
$env:KADRARIS_API_KEY = "sk-kd-..."

Headers, spend caps and key handling are covered in Authentication.

Step 2: ask a chat model something

The /v1/chat/completions endpoint accepts the OpenAI request format. Point an official OpenAI SDK at the Kadraris base URL and it works as is.

bash
curl https://kadraris.com/v1/chat/completions \
  -H "Authorization: Bearer $KADRARIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [{"role": "user", "content": "Write a haiku about film reels."}]
  }'
python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://kadraris.com/v1", api_key=os.environ["KADRARIS_API_KEY"])

resp = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Write a haiku about film reels."}],
)
print(resp.choices[0].message.content)
print(resp.usage)
javascript
// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://kadraris.com/v1",
  apiKey: process.env.KADRARIS_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "Write a haiku about film reels." }],
});
console.log(resp.choices[0].message.content);

To try another model, edit the model value and nothing else: gpt-6-sol, gemini-3.6-flash and deepseek-v4-flash all accept the same request. The complete field list is in Chat completions.

Step 3: render an image

Image, video and audio models are asynchronous. You start them with POST /v1/generate, which creates a task. Images are quick, so appending ?wait=60 lets the server keep the connection open and reply with the finished result.

bash
curl "https://kadraris.com/v1/generate?wait=60" \
  -H "Authorization: Bearer $KADRARIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.5",
    "input": {"prompt": "A vintage film camera on a wooden desk, morning light", "aspect_ratio": "1024x1024"}
  }'
python
import os, requests

r = requests.post(
    "https://kadraris.com/v1/generate",
    params={"wait": 60},
    headers={"Authorization": f"Bearer {os.environ['KADRARIS_API_KEY']}"},
    json={
        "model": "gpt-image-2.5",
        "input": {"prompt": "A vintage film camera on a wooden desk, morning light", "aspect_ratio": "1024x1024"},
    },
    timeout=130,
)
task = r.json()
print(r.status_code, task["status"])
if task["status"] == "succeeded":
    print(task["output"][0]["url"], task["cost"])
javascript
const r = await fetch("https://kadraris.com/v1/generate?wait=60", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KADRARIS_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "gpt-image-2.5",
    input: { prompt: "A vintage film camera on a wooden desk, morning light", aspect_ratio: "1024x1024" },
  }),
});
const task = await r.json();
console.log(r.status, task.status, task.output?.[0]?.url);

Two outcomes are possible:

  • The image is ready inside the 60 seconds: status 200, status: "succeeded", and the files in the output array.
  • It is not ready yet: status 202 with the task as it is right now. From there, either poll the task or let a webhook tell you when it is done.

The URLs in output expire after a while, so save any file you need.

This model currently costs $0.05 per image. If the generation fails, you are not charged.

Step 4: look at your balance

bash
curl https://kadraris.com/v1/balance -H "Authorization: Bearer $KADRARIS_API_KEY"
json
{ "balance": "12.40", "available": "11.63", "currency": "USD", "low_balance": false }

The available figure is lower than balance while tasks are still running, because their estimated cost is reserved until they finish.

Where to go from here

You want toRead
Stream replies or call toolsChat completions
Use the Anthropic SDK or Claude CodeAnthropic Messages, Claude Code
Make video and audioGenerate
Look up model ids, prices, parametersModels
Handle things going wrongErrors
Connect n8n, Make or ZapierNo-code