XAI Bridge: Access the SophNet Platform with Any API Protocol

Unlock the Full Potential of SophNet (įŽčŊ) with XAI Bridge
Are you using the SophNet (įŽčŊ) platform and excited by its cost-effective models like Qwen3-Coder
, Kimi-K2
, and GLM-4.5
?
The SophNet platform provides a standard OpenAI API interface, which is great. But what if your application, toolchain, or personal preference is based on Anthropic's Claude API format? Do you have to refactor your existing code just to integrate a new model?
Now, with XAI Bridge, you can have the best of both worlds!
It acts as a powerful "universal protocol converter" that sits between your application and the SophNet platform. Even though the SophNet platform only "speaks" the OpenAI language, XAI Bridge allows it to understand Claude's commands. This means you can use your favorite Claude SDK or tools to call any model on the SophNet platform!
Why is This Combination So Powerful?
- Protocol Freedom: Your application code requires no changes. Whether your tools are based on OpenAI or Claude, they can now seamlessly connect to the SophNet platform.
- Simplified Model Integration: Want to try
Qwen3-Coder
's coding capabilities in your Claude application? Now it's as simple as changing a model name.
Three Steps to Unlock Dual-Protocol Access on the SophNet Platform
Let's walk through a concrete example to see just how simple the configuration is.
-
Prepare the
docker-compose.yml
File This is the core of all the magic. Create adocker-compose.yml
file with the following content:services: xai-bridge-provider: container_name: xai-bridge-provider image: proxyxai/xai-bridge-provider pull_policy: always restart: always ports: - 8080:8080 environment: # --- Core Configuration: Point to SophNet's OpenAI-compatible endpoint --- - OPENAI_API_URLS=https://www.sophnet.com/api/open-apis/v1/chat/completions # --- Note: Leave this empty! --- # Since our target is SophNet, which only provides an OpenAI interface, # the Bridge will intelligently convert and send Claude requests to the OPENAI_API_URLS above. - CLAUDE_API_URLS= # --- Key Configuration: Leave empty for transparent proxying --- # The Bridge will directly use the API Key provided in the client's request. - OPENAI_API_KEY= - CLAUDE_API_KEY= # Leave empty for now - MODEL_MAPPER= networks: xai-bridge-provider: driver: bridge
-
Understand the Core Configuration
OPENAI_API_URLS
: We point this to the OpenAI-compatible endpoint provided by the SophNet platform. This is the final destination for all our requests.CLAUDE_API_URLS
: This is the key! We leave it empty. In this mode, XAI Bridge enters a powerful "single-destination conversion" mode: it will take all incoming Claude-formatted requests, convert them, and send them to the address specified inOPENAI_API_URLS
.API_KEY
variables: We also leave the keys empty, allowing the Bridge to act as a transparent proxy. It will directly use the key sent by your client, whether it'sAuthorization: Bearer sk-xxx
orx-api-key: sk-xxx
.
-
Start with a Single Command! In the directory containing your
docker-compose.yml
file, run:docker-compose up -d
That's it! Your XAI Bridge, now running at
http://localhost:8080
, is ready to go.
Usage Guide
Your router is up and running. Now let's call the Qwen3-Coder
model on the SophNet platform.
Method 1: OpenAI Protocol (Native Proxy)
This is just like calling the SophNet platform directly. The request is passed transparently through the Bridge.
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SOPHON_API_KEY" \
-d '{
"model": "Qwen3-Coder",
"messages": [
{
"role": "user",
"content": "Write a quicksort algorithm in Python"
}
]
}'
Method 2: Claude Protocol (Protocol Conversion)
Now, we're using the Claude API format!
curl http://localhost:8080/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_SOPHON_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "Qwen3-Coder",
"messages": [
{
"role": "user",
"content": "Write a quicksort algorithm in Python"
}
],
"max_tokens": 2048
}'
What just happened? XAI Bridge received this Claude-formatted request, seamlessly converted it to the OpenAI format internally, and then sent it to the SophNet platform. To you, it feels like you're interacting directly with a SophNet service that supports the Claude API!
Similarly, you can use both methods to call all other models supported by the SophNet platform, such as Kimi-K2
and GLM-4.5
. Your application can now be truly protocol-agnostic, giving you the freedom to choose the best model for the job without worrying about integration barriers.