OpenAI-compatible API

Use RedWake AI from your own apps

Create a user API key from Account, subscribe for balance, then call the RedWake endpoint. Each key is bound to a model and system prompt, so the AI follows the behavior configured for that key.

Step 1

Create key

Account → Create API Key. Choose model, request limit, and system prompt.

Step 2

Subscribe

Subscribe VIP or Premium via Lemon Squeezy. Balance updates live after checkout.

Step 3

Call API

Use Authorization: Bearer rw-... with the chat completions endpoint.

Endpoint

POSThttps://redwakeai.vercel.app/api/v1/chat/completions

cURL example

snippet-034921.shbash
curl -N https://redwakeai.vercel.app/api/v1/chat/completions \
  -H "Authorization: Bearer rw-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "user", "content": "Build me a landing page" }
    ],
    "stream": true
  }'

JavaScript / OpenAI SDK

The endpoint is OpenAI-compatible, so the official SDK works with a one-line baseURL change.

snippet-034926.tstypescript
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://redwakeai.vercel.app/api/v1',
  apiKey: 'rw-YOUR_KEY',
})

const stream = await client.chat.completions.create({
  model: 'REDWAKE FAST',
  messages: [{ role: 'user', content: 'Hello!' }],
  stream: true,
})

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || '')
}

HTML preview in chat

If the assistant returns an HTML code block, RedWake shows a sandboxed preview card in the chat.

snippet-034931.mdmarkdown
```html
<div style="padding:40px;background:#111;color:white">Hello RedWake</div>
```

Billing

User-owned keys consume account balance. A small per-request amount is charged after the upstream AI accepts the request. Subscribe via Lemon Squeezy from the Account page — VIP and Premium plans fund your balance automatically.