> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synapsai.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrations

> Integrate SynapsAI Cloud with LangChain, LlamaIndex, FAISS, Gradio, FastAPI, and OpenAI-compatible tools

This page gives a high-level overview of integrating **SynapsAI Cloud** into your stack and links to framework-specific guides.

## Conventions

| Setting                | Value                                                             |
| ---------------------- | ----------------------------------------------------------------- |
| API base               | `https://api.synapsai.cloud/v1`                                   |
| Python SDK             | `pip install --upgrade synapsai-python` — client class `SynapsAI` |
| API key env var        | `SYNAPSAI_API_KEY`                                                |
| OpenAI-compat env vars | `OPENAI_API_BASE`, `OPENAI_API_KEY`                               |

For OpenAI library compatibility, see [Migrate from OpenAI](/guides/migrate-from-openai).

***

## Quick REST example

```bash theme={null}
export SYNAPSAI_API_KEY="sk-...."
curl -sSf -X POST "https://api.synapsai.cloud/v1/chat/completions" \
  -H "Authorization: Bearer $SYNAPSAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<YOUR_MODEL_ID>",
    "messages": [
      {"role": "system", "content": "You are a concise assistant."},
      {"role": "user", "content": "Write a 3-sentence summary of why unit tests matter."}
    ],
    "max_tokens": 150,
    "temperature": 0.2
  }' | jq .
```

<Tip>
  Browse more examples in the [Examples](/examples/introduction) section.
</Tip>

***

## Framework guides

* [LangChain](/guides/integrations-langchain)
* [LlamaIndex](/guides/integrations-llamaindex)
* [Embeddings + FAISS](/guides/integrations-embeddings-faiss)
* [Gradio / FastAPI](/guides/integrations-gradio-fastapi)

***

## Practical notes

* **Rate limits and retries:** Use exponential backoff on `429` responses. See [Rate limits](/resources/rate-limits).
* **OpenAI-compatible libraries:** Set `OPENAI_API_BASE=https://api.synapsai.cloud/v1` and test with a simple call before integrating complex chains.
* **Security:** Never embed API keys in client-side code. See [Security best practices](/guides/security-best-practices).
