STRAITLY IS NOW IN ALPHA · GET 30% OFF YOUR FIRST $10K OF TOKEN SPEND · SEE IF YOU QUALIFY

SDKs & frameworks

There is no Straitly SDK to learn, and that is deliberate. Anything written against the OpenAI or Anthropic libraries works by changing the base URL and the key. Their documentation for parameters, tool calling, structured outputs, and vision applies unchanged.

# OpenAI SDK, Python
from openai import OpenAI
client = OpenAI(base_url="https://api.straitly.ai/v1", api_key="sk-...")

# Anthropic SDK, Python
from anthropic import Anthropic
client = Anthropic(base_url="https://api.straitly.ai", api_key="sk-...")
python
Environment-variable route, if you would rather not touch code:
OPENAI_BASE_URL=https://api.straitly.ai/v1 and OPENAI_API_KEY=sk-…

Anything that accepts a custom OpenAI base URL works the same way.

# LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="claude-sonnet-5", base_url="https://api.straitly.ai/v1", api_key="sk-...")

# LlamaIndex
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(model="claude-sonnet-5", api_base="https://api.straitly.ai/v1", api_key="sk-...")

# Vercel AI SDK (TypeScript)
import { createOpenAI } from "@ai-sdk/openai";
const straitly = createOpenAI({ baseURL: "https://api.straitly.ai/v1", apiKey: process.env.STRAITLY_API_KEY });
python