Šis puslapis dar neišverstas, todėl rodomas angliškai.
Migrating from Anthropic
ORYVOX exposes Claude models through the OpenAI-compatible API, so you switch from the
ORYVOX exposes Claude models through the OpenAI-compatible API, so you switch from the
Messages API to chat completions (or /responses).
Request mapping
| Anthropic Messages | ORYVOX /chat/completions |
|---|---|
model: "claude-sonnet-5-5" | model: "anthropic/claude-sonnet-5.5" (or a routing profile) |
system: "..." | first message {"role": "system", "content": "..."} |
messages[].content blocks (text, image) | string, or parts {"type":"text"} / {"type":"image_url"} |
max_tokens (required) | max_tokens (optional) |
tools[].input_schema | tools[].function.parameters |
tool_use block | message.tool_calls[] (function.arguments is a JSON string) |
tool_result block | message {"role": "tool", "tool_call_id": ..., "content": ...} |
stop_reason: "end_turn" / "tool_use" / "max_tokens" | finish_reason: "stop" / "tool_calls" / "length" |
usage.input_tokens / output_tokens | usage.prompt_tokens / completion_tokens |
x-api-key header | Authorization: Bearer ory_live_... |
Before and after
# Before
import anthropic
client = anthropic.Anthropic()
msg = client.messages.create(
model="claude-sonnet-5-5", max_tokens=500, system="Be concise.",
messages=[{"role": "user", "content": "Summarise this ticket: ..."}],
)
print(msg.content[0].text)
# After
from oryvox import Oryvox
client = Oryvox()
res = client.responses.create(
model="anthropic/claude-sonnet-5.5", instructions="Be concise.",
input="Summarise this ticket: ...", max_output_tokens=500,
)
print(res.output_text)Streaming
Anthropic's content_block_delta events become response.output_text.delta events
(/responses) or chat.completion.chunk deltas (/chat/completions). See Streaming.
Notes
- Anthropic prompt caching is applied by ORYVOX automatically where it helps; you do not need
cache_controlblocks. Discounts appear incost. - Extended thinking: use
oryvox-reasoningor a reasoning-capable Claude model. - With BYOK you can keep using your Anthropic account and pricing.
Ar šis puslapis buvo naudingas?