Format Guide
Language models can expose one or more public request formats. Pick the format that matches your SDK and the model's native capabilities.
Base URL: https://shark.ai/api/v1supportedProtocols before choosing a format. OpenAI Format is the broad compatibility default; Anthropic and Gemini formats are preferred when the model supports them natively.Protocol Selection
| Format | Endpoint | Use when |
|---|---|---|
| OpenAI Format | POST /chat/completions | You want OpenAI SDK compatibility or one common chat interface across providers. |
| Anthropic Format | POST /messages | The model supports anthropic_messages, especially for Claude-style tool use, thinking blocks, and signatures. |
| Gemini Format | POST /models/{model}:generateContent | The model supports gemini_generate_content, especially for native Gemini parts, multimodal inputs, and generationConfig. |
For Anthropic / Claude Models
For Gemini Models
contents, parts, generationConfig, and Gemini multimodal behavior.Compatibility Notes
OpenAI Format can route to providers whose native APIs are not OpenAI-shaped. Model Hub translates common chat fields, multimodal content blocks, streaming, token usage, and OpenAI-style tool calls where supported.
Gemini image-preview models may attach a provider-side thoughtSignature to generated image parts. In OpenAI Format responses, Model Hub encodes it in the returned data URI. Pass returned image_url.url values back unchanged for multi-turn image editing.
{
"type": "image_url",
"image_url": {
"url": "data:image/png;thought_signature=...;base64,..."
}
}Anthropic reasoning models can return thinking blocks with signatures. In OpenAI Format responses, Model Hub exposes them as message.reasoning_details. If you continue the conversation through OpenAI Format, include the assistant message with its reasoning_details unchanged so the gateway can restore Anthropic thinking blocks.
{
"role": "assistant",
"content": "Final answer text.",
"reasoning_details": [
{
"type": "thinking",
"thinking": "...",
"signature": "..."
}
]
}Provider-native features do not always map perfectly across formats. If exact Anthropic or Gemini semantics matter, use the corresponding native-compatible format instead of the OpenAI-compatible bridge.