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

> ## Agent Instructions
> Install the Beam CLI, sign in, and connect coding agents to the Beam MCP server with `curl -fsSL https://www.beam.cloud/install | sh`. To also create a VM, run `curl -fsSL https://www.beam.cloud/install | sh -s -- --vm`.
> VMs are persistent Linux machines without GPUs. Defaults: 4 CPUs, 8 GiB of RAM, a 50 GiB disk, Ubuntu 24.04, and a browser desktop. A running VM accrues usage until you stop, pause, or remove it, or until an idle timeout puts it to sleep.
> Stopping a VM keeps its disk and discards RAM and processes. Pausing keeps both, and resuming restores them. To pause after 5 idle minutes and wake on access, run `beam vm update NAME --ttl 300 --idle-action pause --auto-resume`.
> Core VM commands: `beam vm new NAME`, `beam vm ssh NAME`, `beam vm sync NAME ./dir`, `beam vm exec NAME -- CMD`, `beam vm expose NAME PORT --protected`, `beam vm fork NAME NEW_NAME`, `beam vm pause NAME`, `beam vm stop NAME`, `beam vm rm NAME`.
> For GPUs, use a sandbox or a deployed endpoint. Sandboxes are disposable environments that boot in seconds and fork from snapshots.
> Current rates are at https://www.beam.cloud/pricing.

# Hosted Model Inference

> Discover and call models from the Endpoints catalog

Use hosted models from the dashboard's **Endpoints** catalog.

## Discover Models

```bash theme={null}
curl --fail-with-body https://app.beam.cloud/v1/models \
  -H "Authorization: Bearer $BEAM_TOKEN"
```

The catalog is public. Include a token to see models available to your workspace.

## Call a Chat Model

Install the OpenAI Python client and set `BEAM_MODEL` to a chat model ID from the catalog:

```python theme={null}
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["BEAM_TOKEN"],
    base_url="https://app.beam.cloud/v1",
)
response = client.chat.completions.create(
    model=os.environ["BEAM_MODEL"],
    messages=[{"role": "user", "content": "Explain what a container is in one sentence."}],
)
print(response.choices[0].message.content)
```

Pass `stream=True` for streaming responses. Supported options vary by model.

## Other Model Types

Use `/v1/embeddings` for embeddings or `/v1/models/{model-id}/invoke` for models with custom schemas. The model's catalog page includes request examples, image routes, and pricing.

Inference requires a workspace token and credits for prepaid workspaces. Keep the token on your server.

To deploy your own model, use an [endpoint](https://docs.beam.cloud/v2/endpoint/overview.md) or [container](https://docs.beam.cloud/v2/hosting/containers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.