Skip to main content
SynapsAI Cloud exposes OpenAI-compatible endpoints for chat, completions, embeddings, images, and audio. In many cases you can migrate by changing the base URL, API key, and model ID.

Before you begin

  1. Create an account and deploy a model on SynapsAI Cloud.
  2. Create an API key scoped to that deployment.
  3. Copy the model ID from the Models page — this replaces OpenAI model names like gpt-4o.

Environment variables

Set these in your shell or deployment environment:
Libraries that read OPENAI_API_BASE and OPENAI_API_KEY (LangChain, LlamaIndex, many community tools) will route requests to SynapsAI automatically.

Python SDK

The official synapsai package mirrors the OpenAI Python client:
Install with:

Endpoint mapping

SynapsAI also exposes additional endpoints for classification, reranking, video, and other Hugging Face pipeline tasks. See Supported tasks.

cURL example

Streaming

Add "stream": true to receive Server-Sent Events, the same as OpenAI:
See Streaming for full details.

Key differences from OpenAI

Framework integrations

Troubleshooting migration issues

  • Model not found — Use the SynapsAI model ID, not an OpenAI model name.
  • Endpoint not supported — Confirm the pipeline task matches the endpoint. See Supported tasks.
  • 401 / InvalidAPIKeyError — Verify the key is scoped to the model and passed as Bearer auth.
  • Library still hits api.openai.com — Confirm OPENAI_API_BASE is set before the client initializes.
For more errors, see Troubleshooting.