# Share LLM API — overview

Share LLM is an OpenAI-compatible gateway in front of verified shared models.
One token and one base URL serve text, image, video, embedding and rerank
models, and a request written in the Anthropic, Google Gemini or OpenAI
Responses format reaches the same supply.

- Base URL: `https://sharellm.net/v1`
- Authentication: `Authorization: Bearer <token>`. Create a token on the
  Token Management page of the website.
- Model IDs: copy the exact ID from the Model Market. Only listed models can be
  called.

## Endpoint and token

```bash
export SHARE_LLM_TOKEN="sk-..."
export SHARE_LLM_BASE="https://sharellm.net/v1"

curl "$SHARE_LLM_BASE/models" \
  -H "Authorization: Bearer $SHARE_LLM_TOKEN"
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | header | yes | `Bearer <token>` with a token from the Token Management page. |
| `model` | string | yes | Exact model ID copied from the Model Market. Only listed models can be called. |

## Protocols

The same token and the same supply serve four request protocols — use whichever
your client already speaks.

| Protocol | Paths |
| --- | --- |
| OpenAI | `/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`, `/v1/images/generations`, `/v1/images/edits`, `/v1/rerank`, `/v1/videos` |
| Anthropic | `/v1/messages` |
| Google Gemini | `/v1beta/models/{model}:generateContent` |

## Errors

Failures use the OpenAI error envelope: an HTTP status plus a message you can
surface to the caller.

```json
{
  "error": {
    "message": "Invalid token",
    "type": "share_llm_error"
  }
}
```

| Status | Meaning | Description |
| --- | --- | --- |
| 401 | invalid token | Missing, disabled or expired token. |
| 403 | insufficient quota | The token or wallet balance cannot cover the request. |
| 400 | invalid request | A parameter is missing or out of range — the message names the field. |
| 503 | no available channel | No verified supply is currently serving that model, or your route does not include it. |

## Billing

Text and embedding models bill per token, image and flat video models per call,
duration-priced video per generated second × resolution. Every call is itemised
in Usage Logs — open the cost popover on a row to see the breakdown.

## Chapters

- [Text generation](/docs/text.md) — chat completions, streaming and the other text protocols.
- [Image generation & editing](/docs/image.md) — generate an image from a prompt, or edit an existing one.
- [Video generation](/docs/video.md) — submit a task, poll it, fetch the clip.
- [Vector embeddings](/docs/embedding.md) — batch text into vectors.
- [Rerank](/docs/rerank.md) — rescore candidates against a query.