# SDKs and frameworks

> Anything that accepts an OpenAI-compatible base URL works with Lyber.

Source: https://www.lyber.ai/docs/integrations/sdks/ · Markdown: https://www.lyber.ai/docs/md/integrations/sdks.md

Set the base URL to `https://lyber-paid-acceptance-gateway-production.up.railway.app/v1`, the API key to your Lyber key, and the model to one of the two IDs. Leave out parameters Lyber doesn't accept; see [Compatibility](https://www.lyber.ai/docs/api/compatibility/).

- [OpenAI SDKs](https://www.lyber.ai/docs/integrations/sdks/openai/): Python and TypeScript, the official clients.
- [Vercel AI SDK](https://www.lyber.ai/docs/integrations/sdks/vercel-ai-sdk/): Through the OpenAI-compatible provider.
- [LangChain](https://www.lyber.ai/docs/integrations/sdks/langchain/): ChatOpenAI with a custom base URL.

## Any HTTP client

No SDK is required. Send JSON to `https://lyber-paid-acceptance-gateway-production.up.railway.app/v1/chat/completions` with your key as a bearer token.

Python (`main.py`):

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://lyber-paid-acceptance-gateway-production.up.railway.app/v1",
    api_key=os.environ["LYBER_API_KEY"],
)

response = client.chat.completions.create(
    model="minimax-m3.1-flash-abliterated",
    messages=[{"role": "user", "content": "Explain abliteration in two sentences."}],
    max_tokens=1024,
)
print(response.model)
print(response.choices[0].message.content)
```

TypeScript (`main.ts`):

```ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://lyber-paid-acceptance-gateway-production.up.railway.app/v1",
  apiKey: process.env.LYBER_API_KEY,
});

const response = await client.chat.completions.create({
  model: "minimax-m3.1-flash-abliterated",
  messages: [{ role: "user", content: "Explain abliteration in two sentences." }],
  max_tokens: 1024,
});
console.log(response.model);
console.log(response.choices[0].message.content);
```

curl (`request.sh`):

```bash
curl https://lyber-paid-acceptance-gateway-production.up.railway.app/v1/chat/completions \
  -H "Authorization: Bearer $LYBER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m3.1-flash-abliterated",
    "messages": [{"role": "user", "content": "Explain abliteration in two sentences."}],
    "max_tokens": 1024
  }'
```
