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

# Modalities

> Text, image, video, speech, embeddings, and vision.

The inference API supports six output modalities. Each maps to an SDK method. You pick a model that supports the modality you need (use the [catalog](/sdk/inference/catalog) to search), then call the matching method.

## All modalities

| Modality         | SDK method                                                 | Example models                             |
| ---------------- | ---------------------------------------------------------- | ------------------------------------------ |
| Text             | `sdk.inference.chat.completions.create()`                  | `gpt-4o`, `claude-sonnet`, `deepseek-chat` |
| Text (responses) | `sdk.inference.responses.create()`                         | `gpt-4o`, `gemini-2.5`                     |
| Vision           | `sdk.inference.chat.completions.create()` with image parts | `gpt-4o`, `claude-sonnet`                  |
| Images           | `sdk.inference.images.generate()`                          | `flux-schnell`, `stable-diffusion-3`       |
| Video            | `sdk.inference.videos.generate()`                          | `veo-3`, `kling`                           |
| Speech (TTS)     | `sdk.inference.audio.speech()`                             | `tts-1`, `elevenlabs`                      |
| Transcription    | `sdk.inference.audio.transcriptions()`                     | `whisper-1`                                |
| Embeddings       | `sdk.inference.embeddings.create()`                        | `text-embedding-3`, `embed`                |

## Text

```typescript theme={null}
const completion = await sdk.inference.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Name three Layer 2s." }],
});

console.log(completion.choices[0].message.content);
```

## Image

```typescript theme={null}
const image = await sdk.inference.images.generate({
  model: "flux-schnell",
  prompt: "A futuristic city at dawn, isometric, pastel palette",
  size: "1024x1024",
});

console.log(image.url);
```

## Embeddings

```typescript theme={null}
const { embeddings } = await sdk.inference.embeddings.create({
  model: "text-embedding-3-small",
  input: "State channels let parties transact off-chain.",
});

console.log(embeddings[0].vector.length);
```

## Vision

Send an image alongside text by using content parts in the message:

```typescript theme={null}
const completion = await sdk.inference.chat.completions.create({
  model: "gpt-4o",
  messages: [
    {
      role: "user",
      content: [
        { type: "text", text: "What's in this image?" },
        { type: "image_url", image_url: { url: "https://example.com/photo.jpg" } },
      ],
    },
  ],
});
```

## Related

* [Inference](/sdk/inference/overview) — all capabilities at a glance
* [Model Catalog](/sdk/inference/catalog) — search models by modality
* [Streaming Inference](/sdk/inference/streaming) — stream text responses
