Complete guide to using the OrProject API service — a fully compatible Anthropic Claude API.
The OrProject API is fully compatible with Anthropic's Messages API. Simply replace the base URL and use your OrProject API key.
https://orproject.online/v1
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!"}]
}'
| Model ID | Provider | Tier | Input $/1M tokens | Output $/1M tokens |
|---|---|---|---|---|
claude-opus-4.7 | Anthropic | Complex reasoning | $15.00 | $75.00 |
claude-opus-4.6 | Anthropic | Complex reasoning | $15.00 | $75.00 |
claude-opus-4.5 | Anthropic | Complex reasoning | $15.00 | $75.00 |
claude-sonnet-4.6 | Anthropic | Balanced performance | $3.00 | $15.00 |
claude-sonnet-4.5 | Anthropic | Balanced performance | $3.00 | $15.00 |
claude-haiku-4.5 | Anthropic | Speed-optimized | $0.80 | $4.00 |
/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
}
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"}
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?"}]
}
/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
}'
/v1/models
Returns all available models.
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"
}
}
# 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
# Configure Codex to use OrProject
export OPENAI_BASE_URL=https://orproject.online/v1
export OPENAI_API_KEY=sk-ant-YOUR_KEY_HERE
# Set in your .env or shell
ANTHROPIC_BASE_URL=https://orproject.online/v1
ANTHROPIC_API_KEY=sk-ant-YOUR_KEY_HERE
For IDE extensions that support custom API endpoints:
https://orproject.online/v1sk-ant-... key# 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."}]
}'
View your API usage and remaining budget at /usage. Enter your API key to see:
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.
Errors follow the Anthropic error format:
{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid API key."
}
}
| Status | Type | Description |
|---|---|---|
| 401 | authentication_error | Invalid or missing API key |
| 403 | permission_error | API key disabled |
| 429 | rate_limit_error | Budget exceeded |
| 500 | api_error | Internal server error |