Draftworks

Quickstart

Create a key and make your first GPT-5.5 request with curl, Python, or TypeScript.

1. Create an account and an API key

  1. Sign up at draftworks.dev and buy credits (minimum $5).
  2. Go to /dashboard/keys and create a key.
  3. Copy the key immediately. It is shown once and stored only as a SHA-256 hash — see authentication.

Keys look like dw_live_.... Set it in your environment:

Terminal
export DRAFTWORKS_API_KEY="dw_live_..."

The model id is gpt-5.5. Upstream reports the pinned snapshot gpt-5.5-2026-04-24; both ids are accepted.

2. Make a request

curl

Terminal
curl https://www.draftworks.dev/v1/chat/completions \
  -H "Authorization: Bearer $DRAFTWORKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Name the three laws of thermodynamics, one line each." }
    ]
  }'

Expected response (trimmed):

{
  "id": "chatcmpl-9f3a1c2e7b",
  "object": "chat.completion",
  "created": 1783382400,
  "model": "gpt-5.5-2026-04-24",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "1. Energy is conserved. 2. Entropy of an isolated system never decreases. 3. Entropy approaches a constant as temperature approaches absolute zero."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 21,
    "completion_tokens": 74,
    "total_tokens": 95
  }
}

Python

Use the official OpenAI SDK. Only base_url and api_key change.

quickstart.py
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://www.draftworks.dev/v1",
    api_key=os.environ["DRAFTWORKS_API_KEY"],  # dw_live_...
)

completion = client.chat.completions.create(
    model="gpt-5.5",
    messages=[
        {"role": "user", "content": "Explain TCP slow start in two sentences."}
    ],
)

print(completion.choices[0].message.content)
print(completion.usage)

Expected output (trimmed):

TCP slow start ramps the congestion window exponentially from a small initial
value, doubling it each round trip until loss or ssthresh is reached. ...
CompletionUsage(prompt_tokens=18, completion_tokens=92, total_tokens=110)

TypeScript

quickstart.ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://www.draftworks.dev/v1",
  apiKey: process.env.DRAFTWORKS_API_KEY, // dw_live_...
});

const completion = await client.chat.completions.create({
  model: "gpt-5.5",
  messages: [
    { role: "user", content: "Explain TCP slow start in two sentences." },
  ],
});

console.log(completion.choices[0].message.content);
console.log(completion.usage);

Expected output (trimmed):

TCP slow start ramps the congestion window exponentially ...
{ prompt_tokens: 18, completion_tokens: 92, total_tokens: 110 }

3. What you got, beyond the completion

Every response includes an x-draftworks-receipt header: an Ed25519-signed statement of the model used, hashes of the exact request and response bytes, and the token counts you were billed for. Keep the x-draftworks-receipt-id and you can retrieve the receipt at any time from GET /v1/receipts/{id} — no auth required. See verification.

Next steps

On this page