> For the complete documentation index, see [llms.txt](https://docs.nebulablock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nebulablock.com/api-reference/inference-api.md).

# Inference API

The OpenAI-compatible Inference API: chat completions, vision, images, video, embeddings, and reranking.

The Inference API runs models. It implements the OpenAI API surface, so existing OpenAI SDKs and tools work against it once you change the base URL.

* **Base URL:** `https://inference.nebulablock.com/v1`
* **Authentication:** `Authorization: Bearer <your API key>` — see [Authentication](/api-reference/authentication.md)

> **Note:** These endpoints are also reachable at `https://api.nebulablock.com/v1`. Prefer the `inference.nebulablock.com` host.

## Endpoints

| Endpoint                                                                                   | What it does                    |
| ------------------------------------------------------------------------------------------ | ------------------------------- |
| [`GET /v1/models`](/api-reference/inference-api/list-models.md)                            | List every model you can call   |
| [`POST /v1/chat/completions`](/api-reference/inference-api/chat-completions.md)            | Chat and text generation        |
| [`POST /v1/chat/completions`](/api-reference/inference-api/vision.md) (with image content) | Image understanding             |
| [`POST /v1/images/generations`](/api-reference/inference-api/images.md)                    | Image generation                |
| [`POST /v1/videos/generations`](/api-reference/inference-api/videos.md)                    | Video generation (asynchronous) |
| [`POST /v1/embeddings`](/api-reference/inference-api/embeddings.md)                        | Text embeddings                 |
| [`POST /v1/rerank`](/api-reference/inference-api/rerank.md)                                | Document reranking              |

## Using an OpenAI SDK

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://inference.nebulablock.com/v1",
    api_key=os.environ["NEBULA_API_KEY"],
)
```

## See also

* [Serverless Inference](/products/serverless-inference.md)
* [Model Catalog](/products/serverless-inference/model-catalog.md)
* [Platform API](/api-reference/platform-api.md)
