Synapse
Esc
  • Docs
    Make your first request↵
  • Streaming
  • Function calling
  • Errors and rate limits
  • Pages
    Home
  • Models
  • Pricing and cost calculator
  • Rate limits by tier
  • Enterprise, SOC 2 and data retention
  • Changelog

docs · quickstart

Make your first request

Three steps and about three minutes. You'll stream a response from Synapse Flash, our fastest general model. Pick your language in any code block; the rest of the docs will follow.

Get an API key#

Sign up with email or GitHub. Your first key is created for you and shown once, so copy it somewhere safe. Free accounts get $5 of credit every month, no card needed.

Then export it in your shell. The SDKs read SYNAPSE_API_KEY automatically.

export SYNAPSE_API_KEY="syn_live_..."

Install the SDK#

Official SDKs for Python 3.9+, Node 18+ and Go 1.22+. They're thin wrappers over plain HTTPS, so cURL works too.

pip install synapse-sdk

Make your first call#

This streams tokens as they're generated. The first one should arrive in about 120ms.

from synapse import Synapse

client = Synapse()  # reads SYNAPSE_API_KEY

stream = client.chat.create(
    model="syn-flash",
    messages=[{"role": "user", "content": "Explain latency in 8 words"}],
    stream=True,
)

for chunk in stream:
    print(chunk.delta, end="", flush=True)

You should see something like:

text
Latency: the pause between asking and knowing.

What next#