Claude API Gateway
Full Tool Calling. No Limits.
OpenAI-compatible proxy β parallel tools, tool_choice, tool_result multi-turn, streaming tool chunks, auto token-reset, rolling 180K context. All in one Python file.
https://.hf.space/v1 Bearer sukunaclaude-opus-4-6API Endpoints
Models
Quick Start
from openai import OpenAI client = OpenAI( base_url="https://.hf.space/v1" , api_key="sukuna", ) resp = client.chat.completions.create( model="claude-opus-4-6", messages=[{"role": "user", "content": "Write a quicksort in Python"}], ) print(resp.choices[0].message.content)
Live Test
All Tool Calling Features
β Single Tool Call
Model calls one function, you return the result, model finishes response. Full multi-turn conversation support.
β Parallel Tool Calls
Model calls multiple tools in one response. Control with parallel_tool_calls: true/false.
β tool_choice
"auto" Β· "none" Β· "required" Β· {"type":"function","name":"..."} β all modes supported.
β Multi-Turn Results
Pass tool results back via role:"tool" messages. Model reads them and continues.
β Both Schema Formats
OpenAI parameters and Anthropic input_schema both accepted. Auto-converted internally.
β Streaming Tool Chunks
SSE streaming with finish_reason:"tool_calls" delta chunks, just like the real OpenAI API.
β Legacy Functions
Deprecated functions + function_call format still supported and auto-converted.
β Auto Token Reset
On 429/502/503/timeout: fresh User-Agent + cookies + exponential back-off. Up to 5 retries.
Start + Claude Code Export
# ββ 1. Install βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ pip install fastapi uvicorn httpx # ββ 2. Run the proxy βββββββββββββββββββββββββββββββββββββββββββββββββββ python app.py # ββ 3. Export for Claude Code (paste in terminal) ββββββββββββββββββββββ export ANTHROPIC_BASE_URL=https://.hf.space export ANTHROPIC_API_KEY=sukuna export ANTHROPIC_MODEL=claude-opus-4-6 # ββ 4. Launch Claude Code ββββββββββββββββββββββββββββββββββββββββββββββ claude