Getting Started
Agent SDKs
Build agents on OpenInfer with the Anthropic and OpenAI SDKs.
Agent SDKs talk to a model over a standard API, so pointing them at OpenInfer is a configuration change.
Setup
Pick your SDK and language. Use model slugs from GET /v1/models.
The Claude Agent SDK reads the same environment variables as Claude Code, so set them in the shell that runs your agent:
export ANTHROPIC_BASE_URL=https://api.openinfer.ai
export ANTHROPIC_AUTH_TOKEN=pk_...Then set the model in your agent options to an OpenInfer slug.
import asyncio
from claude_agent_sdk import ClaudeAgentOptions, query
async def main():
async for message in query(
prompt="Summarize the files in this directory.",
options=ClaudeAgentOptions(model="@oi/Qwen3.8-Flash-Next"),
):
print(message)
asyncio.run(main())Tool calling
Agents depend on tool calling. Both Chat Completions and Responses accept tools and tool_choice; see Chat Completions and Responses. Very small models can chat but cannot drive tools, so start with a model in the 9B class or larger.