Connect to the same gateway using familiar SDKs - unified authentication, billing, and monitoring
NexusFlow currently provides three public protocols: OpenAI, Anthropic Messages, and Gemini-compatible GenerateContent. These protocols connect through a compatibility layer to the same model routing, billing, and monitoring pipeline, allowing you to continue using familiar SDKs while keeping provider differences from leaking into your business logic. Gemini-compatible means request/response format compatibility - it does not mean the platform hosts native Google Gemini models.
Supported Protocols
Protocol
Endpoint Prefix
Corresponding SDK
Primary Use
OpenAI Chat Completions
/v1/chat/completions
OpenAI SDK
Chat, Tool Calling
OpenAI Image Generations
/v1/images/generations
OpenAI SDK
Image Generation
OpenAI Embeddings
/v1/embeddings
OpenAI SDK
Text Embeddings
Anthropic Messages
/v1/messages
Anthropic SDK
Chat, Tool Calling
Gemini-compatible GenerateContent
/v1beta/models/{model}:generateContent
Google GenAI SDK / HTTP
Chat format compatibility
Not all models support all protocols. The model detail page will display the model's current supported_protocols.
Protocol Boundaries
NexusFlow's current public API only lists directly callable compatible endpoints. The model detail page will show each model's actual supported_protocols.
Protocol / Interface
Endpoint
Current Status
Description
OpenAI Chat Completions
/v1/chat/completions
Available
Default recommended endpoint for text, reasoning, multimodal, and coding models.
Anthropic Messages
/v1/messages
Available
Compatible with Anthropic SDK and Messages request/streaming event format.
Gemini-compatible GenerateContent
/v1beta/models/{model}:generateContent
Available
Compatible with Google GenAI / Gemini GenerateContent request format.
OpenAI Image Generations
/v1/images/generations
Available
Synchronous compatible endpoint for image generation; complex image/video tasks can also use /v1/tasks.
OpenAI Embeddings
/v1/embeddings
Available
Text embedding model endpoint.
NexusFlow Tasks
/v1/tasks
Available
Unified async task endpoint for images and videos.
stream = client.chat.completions.create(
model="qwen3-max",
messages=[{"role": "user", "content": "Hello!"}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
Image Generation
Models supporting the openai:image-generations protocol can generate images via the OpenAI SDK.
response = client.images.generate(
model="wan2.6-t2i",
prompt="A futuristic city at sunset, cyberpunk style",
size="1024x1024",
n=1,
)
print(response.data[0].url)
Text Embeddings
Models supporting the openai:embeddings protocol can convert text to vector representations, useful for semantic search, clustering, RAG, and other scenarios.
with client.messages.stream(
model="qwen3-max",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
) as stream:
for text in stream.text_stream:
print(text, end="")
Gemini-compatible Protocol
Provides a Google GenAI-style /v1beta/models/{model}:generateContent compatible endpoint, suitable for scenarios where you need to continue using the Gemini SDK. The model in the path is a NexusFlow model ID, for example qwen-turbo, not a native Google Gemini model name. Currently focused on generateContent and streamGenerateContent.
from google import genai
from google.genai import types
client = genai.Client(
api_key="sk-air-your-key",
http_options=types.HttpOptions(
api_version="v1beta",
base_url="https://nexusflow.vip",
),
)
response = client.models.generate_content(
model="qwen-turbo",
contents="Hello!",
)
print(response.text)
Protocol Selection Tips
1.If you use DeepSeek, Qwen, GLM, or other domestic models, we recommend the OpenAI protocol for best compatibility.
2.If you're already using the Anthropic SDK, prefer /v1/messages to reduce SDK migration cost.
3.If your application is based on the Google GenAI SDK, you can use /v1beta/models/{model}:generateContent, but fill in NexusFlow model IDs for model.
4.Check the model detail page's supported_protocols to confirm which protocols a model currently supports.