Guide · OpenAI SDK
Connect OpenAI SDK to Synap
-
Get a free key
Sign in with Google at synap.linkrra.com — no card. Your key starts with
sk-pool-. -
Point the SDK at Synap
The official SDKs work unchanged — the base URL and the key are the only arguments that differ. Pass
stream=Truefor server-sent events; tool calling uses the standard fields.from openai import OpenAI client = OpenAI(base_url="https://synap.linkrra.com/v1", api_key="sk-pool-...") r = client.chat.completions.create( model="qwen3-coder-30b", messages=[{"role": "user", "content": "Write a haiku about diffs"}], ) print(r.choices[0].message.content)import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://synap.linkrra.com/v1", apiKey: process.env.SYNAP_API_KEY }); const r = await client.chat.completions.create({ model: "qwen3-coder-30b", messages: [{ role: "user", content: "Write a haiku about diffs" }], }); console.log(r.choices[0].message.content);
Notes, prices and limits
The official SDKs work unchanged. Recommended model: qwen3-coder-30b —
$0.0675 in and $0.27 out
per 1M tokens, 98,304-token context.
Pass stream=True for server-sent events. Tool calling uses the standard tools and tool_choice fields.
On the free tier: every request counts input and output against 100,000 free tokens a day, and answers stop at 4,096 output tokens. Coding agents send long prompts, so the free tier covers a short session; credits cover the rest.
Field names from OpenAI Python and Node SDKs, run against this API, checked 2026-10-31 22:40 UTC. Prices refresh from /v1/models when this page loads.