Draftworks

SDK compatibility

What works with Draftworks — official SDKs, frameworks, and tools — and what is not implemented.

Draftworks supports OpenAI-compatible clients. Supported endpoints and parameters depend on the selected model. Set the base URL to:

https://api.draftworks.dev/v1

Compatibility matrix

ClientStatusConfiguration
OpenAI Python SDKSupported for catalog endpointsOpenAI(base_url=..., api_key=...)
OpenAI TypeScript SDKSupported for catalog endpointsnew OpenAI({ baseURL, apiKey })
Vercel AI SDKSupportedcreateOpenAI({ baseURL, apiKey })
LangChainSupportedChatOpenAI(base_url=..., api_key=...)
LlamaIndexSupportedOpenAILike(api_base=..., is_chat_model=True)
LiteLLMSupportedmodel openai/gpt-5.6-sol with api_base
Continue, Cursor-style toolsSupportedAny OpenAI-compatible provider entry with a custom base URL

Astra and the GPT-5.6 family support Chat Completions and Responses. Claude, Grok, Kimi, and GLM use Chat Completions. For Claude, use the OpenAI client with the Claude adapter’s supported options; the native Anthropic SDK and /v1/messages are not supported. Current Claude deployments reject schema-constrained output, and image inputs require base64 data URLs.

Official OpenAI SDKs

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.draftworks.dev/v1",
    api_key="dw_live_...",
)
TypeScript
import OpenAI from "openai";

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

Use client.chat.completions for chat models and client.responses for models whose catalog entry lists Responses support. Streaming is supported on both endpoints.

Vercel AI SDK

TypeScript
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const draftworks = createOpenAI({
  baseURL: "https://api.draftworks.dev/v1",
  apiKey: process.env.DRAFTWORKS_API_KEY,
});

const { text } = await generateText({
  model: draftworks("gpt-5.6-sol"),
  prompt: "Summarize RFC 9110 section 9 in five bullets.",
});

streamText and tool calling work as with any OpenAI provider instance.

LangChain

Python
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="gpt-5.6-sol",
    base_url="https://api.draftworks.dev/v1",
    api_key="dw_live_...",
)

LlamaIndex

Python
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="gpt-5.6-sol",
    api_base="https://api.draftworks.dev/v1",
    api_key="dw_live_...",
    is_chat_model=True,
)

LiteLLM

Prefix the model with openai/ so LiteLLM routes it as an OpenAI-compatible provider:

Python
from litellm import completion

response = completion(
    model="openai/gpt-5.6-sol",
    api_base="https://api.draftworks.dev/v1",
    api_key="dw_live_...",
    messages=[{"role": "user", "content": "ping"}],
)

The same values work in LiteLLM Proxy config (model: openai/gpt-5.6-sol, api_base, api_key).

Editor and agent tools

Continue, Cursor-style assistants, aider, and similar tools accept a custom OpenAI-compatible provider: set the base URL to https://api.draftworks.dev/v1, the API key to your dw_live_... key, and the model to gpt-5.6-sol.

Not implemented

The following OpenAI endpoints are not implemented. Any /v1/* path that Draftworks does not serve returns 404 with type: "invalid_request_error" and code: "unknown_endpoint", and a message naming the implemented endpoints (/v1/chat/completions, /v1/responses, /v1/images/generations, /v1/models, /v1/receipts/{id}):

  • Embeddings (/v1/embeddings)
  • Images (/v1/images/*)
  • Audio — speech, transcription, translation (/v1/audio/*)
  • Batch (/v1/batches)
  • Fine-tuning (/v1/fine_tuning/*)

If a framework feature depends on one of these (e.g. a vector-store integration calling embeddings), point that feature at a different provider and route only chat/responses traffic through Draftworks. Frameworks above all support per-capability provider configuration.

Anything else

If a tool speaks the OpenAI wire format but is not listed here, it almost certainly works. The two integration details worth knowing in advance: streamed responses end with an extra usage-bearing chunk (OpenAI-standard, see streaming), and error responses use the standard OpenAI envelope with one extra code, insufficient_credits (see errors).

On this page