← Back to RedBTC AI

API Documentation

OpenAI-compatible API. Use any OpenAI SDK — just change base_url.

Quick Start

# Python
pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.redbtco.com/v1",
    api_key="sk-your-api-key"
)

response = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Endpoints

POST/v1/chat/completions

OpenAI-compatible chat completions. Supports streaming, function calling, and all GPT-5.x models.

# curl example
curl "https://api.redbtco.com/v1/chat/completions" \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4","messages":[{"role":"user","content":"Hello"}]}'
POST/v1/responses

Native Codex responses endpoint with tool use, web search, and code interpreter support.

POST/v1/images/generations

DALL·E-compatible image generation.

client.images.generate(
    model="dall-e-3",
    prompt="A futuristic city at sunset",
    size="1024x1024"
)
GET/v1/models

List available models with pricing. No API key required.

curl "https://api.redbtco.com/v1/models"
POST/v1/messages

Anthropic-compatible Messages endpoint.

GET/health

Service health check.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer sk-your-api-key

Get your API key at redbtco.com/app/ — free registration.

Rate Limits

Default: 60 RPM, 5 concurrent requests per key. Higher limits available on request — contact [email protected].