Guide · Switch from OpenAI

Switch from OpenAI in one line

3 steps · about 2 minutes

  1. Get a free key

    Sign in with Google at synap.linkrra.com — no card. Your key starts with sk-pool-.

  2. Change the base URL

    Two environment variables, and the official SDK sends your existing code here instead. No line of application code moves.

    export OPENAI_BASE_URL=https://synap.linkrra.com/v1
    export OPENAI_API_KEY=sk-pool-...
  3. Name a Synap model

    Swap the model id for one of ours. Streaming, tool calling and the usage object are all unchanged.

    from openai import OpenAI
    
    client = OpenAI()                      # reads the two vars above
    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 same SDK, a different base URL. Recommended model: qwen3-coder-30b — $0.0675 in and $0.27 out per 1M tokens, 98,304-token context.

Run live against this API with openai 2.48.0 (Python) and openai 7.47.0 (Node), both ways: the two environment variables with no code change, and base_url passed to the constructor.

The response is standard OpenAI: choices[0].message.content, a usage object that counts input and output, and r.model echoing the model that answered.

Anything OpenAI-specific stays OpenAI-specific. There is no embeddings, images or audio endpoint here — Synap serves chat models — so leave those calls pointed where they are.

Ids are not the OpenAI ones. Read /v1/models, or use synap-v1 and let us pick.

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 the OpenAI Python and Node SDKs, run against this API, checked 2026-11-03 20:20 UTC. Prices refresh from /v1/models when this page loads.