Launch preview Service availability and integrations are being verified. View readiness

Your first request

Create an account, add prepaid credit and connect your tools to the Redline API.

Create an account and add credit

Register at the Redline console, verify your email and add at least $10.00 of prepaid credit. Card and crypto checkout use the same token prices. There are no free credits.

This site is a launch preview. Check service readiness before relying on the endpoint for client work.

Set your API key

Create a key in the console, or use a separate engagement key with a budget and expiry. Set the key in your local shell. Keep it out of source control and browser code.

Bash / zsh
export REDLINE_API_KEY="replace-with-your-key"

Make a Chat Completions request

Run this command in Bash or zsh. It sends a short prompt and uses prepaid credit. On Windows, use WSL/Git Bash or the Python example below.

curl
curl "https://api.redline-api.duckdns.org/v1/chat/completions" \
  -H "Authorization: Bearer $REDLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "redline-core",
    "messages": [{
      "role": "user",
      "content": "Draft a checklist for an authorised code review."
    }],
    "max_tokens": 256
  }'

Use the Python SDK

Set the same environment variable before running the script. In PowerShell, use $env:REDLINE_API_KEY="replace-with-your-key".

Python
# Install: pip install openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["REDLINE_API_KEY"],
    base_url="https://api.redline-api.duckdns.org/v1",
)
response = client.chat.completions.create(
    model="redline-core",
    messages=[{"role": "user", "content": "Draft a code review checklist."}],
    max_tokens=256,
)
print(response.choices[0].message.content)

Use the JavaScript SDK

Run this on your server or local machine. Never expose your key in browser JavaScript.

JavaScript
// Install: npm install openai
// Save as example.mjs, then run: node example.mjs
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.REDLINE_API_KEY,
  baseURL: "https://api.redline-api.duckdns.org/v1",
});
const response = await client.chat.completions.create({
  model: "redline-core",
  messages: [{ role: "user", content: "Draft a code review checklist." }],
  max_tokens: 256,
});
console.log(response.choices[0].message.content);

Connect an engagement

Use engagement keys to separate client usage. Then choose a tool integration. The SDKs use a base URL ending in /v1; the Anthropic SDK and Claude Code use the origin without /v1.