OrProject API Documentation

Complete guide to using the OrProject API service — a fully compatible Anthropic Claude API.

Quick Start

The OrProject API is fully compatible with Anthropic's Messages API. Simply replace the base URL and use your OrProject API key.

Base URL: https://orproject.online/v1

Authentication

Include your API key in the x-api-key header or as Authorization: Bearer sk-ant-...

curl https://orproject.online/v1/messages \
  -H "x-api-key: sk-ant-YOUR_KEY_HERE" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4.5",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello, Claude!"}]
  }'

Supported Models

Model ID Provider Tier Input $/1M tokens Output $/1M tokens
claude-opus-4.7AnthropicComplex reasoning$15.00$75.00
claude-opus-4.6AnthropicComplex reasoning$15.00$75.00
claude-opus-4.5AnthropicComplex reasoning$15.00$75.00
claude-sonnet-4.6AnthropicBalanced performance$3.00$15.00
claude-sonnet-4.5AnthropicBalanced performance$3.00$15.00
claude-haiku-4.5AnthropicSpeed-optimized$0.80$4.00

API Endpoints

Messages API (Anthropic-compatible)

POST /v1/messages

Create a message using the Anthropic Messages API format. Supports streaming, tool use, and all standard parameters.

{
  "model": "claude-sonnet-4.5",
  "max_tokens": 4096,
  "messages": [
    {"role": "user", "content": "Explain quantum computing"}
  ],
  "stream": false
}

Streaming

Set "stream": true to receive Server-Sent Events (SSE). The response follows Anthropic's streaming format:

event: message_start
data: {"type":"message_start","message":{...}}

event: content_block_start
data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}

event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}

event: content_block_stop
data: {"type":"content_block_stop","index":0}

event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn"},"usage":{"output_tokens":15}}

event: message_stop
data: {"type":"message_stop"}

Tool Use

Full tool use support. Define tools in your request:

{
  "model": "claude-sonnet-4.5",
  "max_tokens": 1024,
  "tools": [
    {
      "name": "get_weather",
      "description": "Get current weather",
      "input_schema": {
        "type": "object",
        "properties": {
          "location": {"type": "string", "description": "City name"}
        },
        "required": ["location"]
      }
    }
  ],
  "messages": [{"role": "user", "content": "What's the weather in Paris?"}]
}

Chat Completions (OpenAI-compatible)

POST /v1/chat/completions

OpenAI-compatible endpoint for tools like OpenCode, Codex, OpenClaw, and IDE integrations.

curl https://orproject.online/v1/chat/completions \
  -H "Authorization: Bearer sk-ant-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4.5",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 1024
  }'

List Models

GET /v1/models

Returns all available models.

Integration Guides

Claude Code

Configure Claude Code to use the OrProject API:

# Set the API base URL and key
export ANTHROPIC_BASE_URL=https://orproject.online/v1
export ANTHROPIC_API_KEY=sk-ant-YOUR_KEY_HERE

# Launch Claude Code
claude

Or in your Claude Code config file (~/.claude/settings.json):

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://orproject.online/v1",
    "ANTHROPIC_API_KEY": "sk-ant-YOUR_KEY_HERE"
  }
}

OpenCode

# Environment variables
export ANTHROPIC_BASE_URL=https://orproject.online/v1
export ANTHROPIC_API_KEY=sk-ant-YOUR_KEY_HERE

# Or for OpenAI-compatible mode
export OPENAI_BASE_URL=https://orproject.online/v1
export OPENAI_API_KEY=sk-ant-YOUR_KEY_HERE

Codex CLI

# Configure Codex to use OrProject
export OPENAI_BASE_URL=https://orproject.online/v1
export OPENAI_API_KEY=sk-ant-YOUR_KEY_HERE

OpenClaw

# Set in your .env or shell
ANTHROPIC_BASE_URL=https://orproject.online/v1
ANTHROPIC_API_KEY=sk-ant-YOUR_KEY_HERE

IDE Integration (VS Code, JetBrains, etc.)

For IDE extensions that support custom API endpoints:

  1. Open extension settings
  2. Set API Base URL to: https://orproject.online/v1
  3. Set API Key to your sk-ant-... key
  4. Select any Claude model

cURL Test

# Non-streaming test
curl -X POST https://orproject.online/v1/messages \
  -H "x-api-key: sk-ant-YOUR_KEY" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4.5",
    "max_tokens": 256,
    "messages": [{"role":"user","content":"Say hello and tell me who you are."}]
  }'

# Streaming test
curl -X POST https://orproject.online/v1/messages \
  -H "x-api-key: sk-ant-YOUR_KEY" \
  -H "content-type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-sonnet-4.5",
    "max_tokens": 256,
    "stream": true,
    "messages": [{"role":"user","content":"Tell me a short joke."}]
  }'

Usage Tracking

View your API usage and remaining budget at /usage. Enter your API key to see:

Rate Limits & Budgets

Each API key has a budget (set by admin). When the budget is exhausted, requests will return a 429 error. Contact your administrator to increase the budget.

Error Handling

Errors follow the Anthropic error format:

{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "Invalid API key."
  }
}
StatusTypeDescription
401authentication_errorInvalid or missing API key
403permission_errorAPI key disabled
429rate_limit_errorBudget exceeded
500api_errorInternal server error