SDKs and frameworks
Use this API from the OpenAI and Anthropic SDKs, agent frameworks, plain HTTP or MCP.
Any tool that speaks OpenAI's or Anthropic's API format works with this one. There is no SDK package of our own: you keep the library you know and change three values.
| Setting | Value |
|---|---|
| Base URL (OpenAI format) | https://test-demo.pinerouter.ai/v1 |
| Base URL (Anthropic format) | https://test-demo.pinerouter.ai (no /v1) |
| API key | A key from API keys, starting with sk- |
| Model | An id from Models, for example gpt-6-luna for text or z-image for images |
Text, streaming and tool calling go through each library's normal chat calls. Images also work through the images endpoint. Video, music, speech and every model setting run as Jobs, which any HTTP client can call: cURL / HTTP has a copy-paste helper.
AI SDKs
Use these when you call a model SDK directly.
Agent frameworks
Use these when a framework orchestrates calls for you.
LangChain
Python, TypeScript
LlamaIndex
Python
LiteLLM
Python, proxy server
OpenAI Agents SDK
Python, TypeScript
Mastra
TypeScript
CrewAI
Python
Pydantic AI
Python
Direct
Use these without a library.
Using an app instead of code, such as Claude Code, Cursor, Open WebUI or n8n? See Integrations.