Guide · LangChain

Connect LangChain to Synap

2 steps · about a minute

  1. Get a free key

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

  2. Point ChatOpenAI at Synap

    langchain-openai takes a base URL like any other provider.

    # pip install langchain-openai
    from langchain_openai import ChatOpenAI
    
    llm = ChatOpenAI(
        model="qwen3-coder-30b",
        base_url="https://synap.linkrra.com/v1",
        api_key="sk-pool-...",
    )
    print(llm.invoke("Summarise this diff in one line").content)
Notes, prices and limits

ChatOpenAI with a different base URL. Recommended model: qwen3-coder-30b — $0.0675 in and $0.27 out per 1M tokens, 98,304-token context.

Everything else in LangChain is unchanged: chains, agents and tools see an ordinary OpenAI-compatible chat model.

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 langchain-openai, run against this API, checked 2026-10-31 22:40 UTC. Prices refresh from /v1/models when this page loads.