API Reference
Drawbridge accepts requests in multiple formats. Use whichever API format your SDK speaks — OpenAI Chat Completions, Anthropic Messages, or OpenAI Responses. Looking to wire up an editor? See the IDE integration guide.
Supported Formats
Choose the format that matches your SDK — all route to the same Claude models on the same key. The OpenAI-compatible formats and the Anthropic Messages API (what Claude Code uses) all return native tool-use. See pricing for the flat per-token rate.
| SDK / Client | Endpoint | Auth | Base URL | Status |
|---|---|---|---|---|
| OpenAI Python/TS SDK | POST /v1/chat/completions | Authorization: Bearer | https://api.drawbridge-tech.com/v1 | Live |
| Anthropic Python/TS SDK | POST /v1/messages | x-api-key + anthropic-version | https://api.drawbridge-tech.com | Live |
| OpenAI Responses API | POST /v1/responses | Authorization: Bearer | https://api.drawbridge-tech.com/v1 | Live |
| curl / HTTP client | Any available endpoint | Depends on endpoint | See above | Live |
Authentication
Authentication depends on which format you use:
- Anthropic Messages API:
x-api-key: <api-key>+anthropic-version: 2023-06-01 - OpenAI formats:
Authorization: Bearer <api-key>
Get a key from the signup page.
Endpoints
/v1/messagesAnthropic Messages API — create a message (streaming or non-streaming). Returns native tool-use, included on your key.
{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"system": "You are a helpful assistant.",
"messages": [
{"role": "user", "content": "Hello!"}
],
"stream": true
}{
"id": "msg_abc123",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello! How can I help you today?"
}
],
"model": "claude-sonnet-4-6",
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 8
}
}/v1/chat/completionsOpenAI Chat Completions API — create a chat completion (streaming or non-streaming)
{
"model": "smart",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"stream": true,
"temperature": 0.7
}{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1716000000,
"model": "smart",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 8,
"total_tokens": 20
}
}/v1/responsesOpenAI Responses API — create a response (streaming or non-streaming)
{
"model": "smart",
"input": [
{"role": "user", "content": "Hello!"}
],
"instructions": "You are a helpful assistant.",
"stream": true
}{
"id": "resp_abc123",
"object": "response",
"created_at": 1716000000,
"model": "smart",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 8,
"total_tokens": 20
}
}/v1/modelsList available models
{
"object": "list",
"data": [
{
"id": "smart",
"type": "model",
"display_name": "smart",
"created_at": "2024-01-01T00:00:00Z"
}
]
}/healthHealth check endpoint (no auth required)
{
"status": "ok"
}Streaming
All POST endpoints support streaming via Server-Sent Events. Set "stream": true in the request body. The SSE format matches whichever API format you use:
data: {"id":"chatcmpl-abc","choices":[{"delta":{"content":"Hello"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc","choices":[{"delta":{"content":"!"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc","choices":[{"delta":{},"finish_reason":"stop"}]}
data: [DONE]event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}
event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"!"}}
event: message_stop
data: {"type":"message_stop"}Rate Limits & Concurrency
Each key has a concurrency limit. When too many requests are in flight at once, further requests return HTTP 429 with a Retry-After header (seconds) — back off and retry after that delay.
Response on a throttled request (HTTP 429):
Retry-After: 12
{"error":{"type":"rate_limit_error","message":"Too many pending requests, please retry later"}}