# Sociaro Gateway

Source: https://docs.sociaro.com/

Use one API key to call text, image, video and audio models. Choose a model, check its request schema and send a request.

- [Set up an API key](https://docs.sociaro.com/keys/index.md)
- [API reference](https://docs.sociaro.com/api-reference/index.md)

Example · Chat completion

cURL

```bash
curl https://api.sociaro.com/v1/chat/completions \
  -H "Authorization: Bearer $SOCIARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "minimax/minimax-m3",
       "messages": [{"role": "user", "content": "hello"}]}'
```

Python

```python
# Requires Python 3 and requests (pip install requests).
import os
import requests

payload = {'model': 'minimax/minimax-m3',
 'messages': [{'role': 'user', 'content': 'hello'}]}

response = requests.post(
    'https://api.sociaro.com/v1/chat/completions',
    headers={
        'Authorization': 'Bearer ' + os.environ['SOCIARO_API_KEY'],
        'Content-Type': 'application/json',
    },
    json=payload,
    timeout=120,
)
response.raise_for_status()
print(response.text)
```

JavaScript

```javascript
// Run as an .mjs file with Node.js 22 or later.

const payload = {
  "model": "minimax/minimax-m3",
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
};

const response = await fetch("https://api.sociaro.com/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.SOCIARO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());
```

## Make your first request

1. **Get a key**

   Sign in at [my.sociaro.com](https://my.sociaro.com) and create a key on the Keys tab. It starts with `sk-` and is shown once.
2. **Connect your client**

   Use the chat request above, or point an OpenAI-compatible client at `https://api.sociaro.com/v1` and give it your Sociaro key.
3. **Check usage**

   Open Spend in the console to see your organisation’s balance and usage. Open a request in Logs for its status and cost.

## Explore the guides

- [**API reference** Look up HTTP methods, paths, authentication and response fields.](https://docs.sociaro.com/api-reference/index.md)
- [**Chat and completions** Send messages with an OpenAI-compatible client.](https://docs.sociaro.com/chat/index.md)
- [**Jobs API** Submit an asynchronous job, check its status and collect the output.](https://docs.sociaro.com/jobs/index.md)
- [**Images and video** Generate media and poll for the finished result.](https://docs.sociaro.com/media/index.md)
- [**Reference images and videos** Use characters, clips and voices as references for a video.](https://docs.sociaro.com/reference-images/index.md)
- [**Files** Upload pictures, clips and audio. List, retrieve or delete your files and job outputs.](https://docs.sociaro.com/files/index.md)
- [**Model catalogue** Look up a published model’s ID, endpoint and request parameters.](https://docs.sociaro.com/models/index.md)
- [**API keys** Create keys, set their permissions and revoke access.](https://docs.sociaro.com/keys/index.md)
- [**Balance and billing** Check your balance with `GET /v1/balance`, top up and understand refusals.](https://docs.sociaro.com/billing/index.md)
- [**Errors** Find a status code and see what to do next.](https://docs.sociaro.com/errors/index.md)

## Logs and data retention

In Logs, open a request to see whether it was charged and read any error or provider reason. Failed generations usually carry no charge. Ideogram bills for generated images even when its safety check withholds them all. See [how failed jobs are billed](https://docs.sociaro.com/jobs/failures/index.md). Media jobs link to their outputs while those files are retained.

By default, the Jobs API removes the stored prompt when a job reaches a terminal status. A provider’s error message can quote text from your request. Those excerpts can remain visible in Logs after the prompt is deleted. Sociaro does not train on your requests. Each model provider has its own data policies.
