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

# Quickstart

> Send your first task to a visual agent in three steps

Send a task to a visual agent in three steps: get an API key, install an SDK, and send a request. The agent plans the steps, runs the vision tools it needs, and returns the result. The request uses the Chat Completions format, so the OpenAI SDK works too.

> [card] [Need one visual model call instead?](https://docs.vlm.run/gateway/quickstart.md)
>
> For a single task such as OCR, visual Q\&A, or detection, call a visual model directly. See the Models quickstart.

## 1. Get an API key

Create a key in the [dashboard](https://app.vlm.run/dashboard/settings/api_keys), then set it in your shell. Agent requests need a key.

```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
export VLMRUN_API_KEY="your-api-key"
```

## 2. Install the SDK

```bash Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
pip install vlmrun
```

```bash Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
npm install vlmrun
```

```bash CLI theme={"theme":{"light":"github-light","dark":"dark-plus"}}
pip install -U vlmrun
```

cURL needs no install. To use the OpenAI SDK instead, see [OpenAI compatibility](https://docs.vlm.run/agents/integrations/integrations-openai-compatibility.md).

## 3. Send your first task

> [!TIP]
>
> Not sure which agent to use? Start with `vlmrun-orion-2:auto`. It picks the backing model and thinking budget for each task. See [Models](https://docs.vlm.run/agents/introduction.md#models) for the `fast` and `pro` variants.

```python Python theme={"theme":{"light":"github-light","dark":"dark-plus"}}
from vlmrun.client import VLMRun

client = VLMRun(api_key="<VLMRUN_API_KEY>")

response = client.agent.completions.create(
    model="vlmrun-orion-2:auto",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Detect the car and describe its color."},
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"
                    },
                },
            ],
        }
    ],
)

print(response.choices[0].message.content)
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"dark-plus"}}
import { VlmRun } from "vlmrun";

const client = new VlmRun({ apiKey: process.env.VLMRUN_API_KEY });

const response = await client.agent.completions.create({
  model: "vlmrun-orion-2:auto",
  messages: [
    {
      role: "user",
      content: [
        { type: "text", text: "Detect the car and describe its color." },
        {
          type: "image_url",
          image_url: {
            url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg",
          },
        },
      ],
    },
  ],
});

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

```bash CLI theme={"theme":{"light":"github-light","dark":"dark-plus"}}
vlmrun chat "Detect the car and describe its color." \
  -i https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg \
  -m vlmrun-orion-2:auto
```

```bash cURL theme={"theme":{"light":"github-light","dark":"dark-plus"}}
curl https://api.vlm.run/v1/openai/chat/completions \
  -X POST \
  -H "Authorization: Bearer $VLMRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vlmrun-orion-2:auto",
    "messages": [
      {
        "role": "user",
        "content": [
          { "type": "text", "text": "Detect the car and describe its color." },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"
            }
          }
        ]
      }
    ]
  }'
```

The agent runs a detection tool on the image, then describes the car. The answer is in `choices[0].message.content`, and the run cost is in the response. See [Pricing](https://docs.vlm.run/pricing.md).

## Next steps

* [Structured output](https://docs.vlm.run/agents/structured-responses.md): get JSON that matches your schema.
* [Inputs](https://docs.vlm.run/agents/inputs.md): send documents, video, and audio.
* [Output files](https://docs.vlm.run/agents/artifacts.md): download the images and video an agent creates.
* [Skills](https://docs.vlm.run/skills/introduction.md): save instructions and an output schema, and reuse them in any request.
* [Agent execution](https://docs.vlm.run/agents/agent-execution): create a saved agent, run it on a file in the background, and read the result.
* [API reference](https://docs.vlm.run/api-reference/v1/post-chat-completions.md): every request and response field.


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