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

# Quickstart

> From zero to a generated image, video, or audio clip in under a minute

This guide walks through the full happy path: install, configure, discover a
model, and run it.

**1. Install**

```bash theme={null}
npm install -g carrothub
carrothub --version
```

See [Installation](https://www.carrothub.ai/docs/cli/installation.md) for `bun`, `pnpm`, or one-off `npx`
usage.

**2. Set your API key**

```bash theme={null}
export CARROTHUB_API_KEY="sk-..."
```

Get a key from the [CarrotHub Console](https://www.carrothub.ai/app/api-keys).
See [Configuration](https://www.carrothub.ai/docs/cli/configuration.md) for `.env` files, custom gateways,
and other options.

**3. Discover a model**

```bash theme={null}
carrothub list --output-type image
```

Pick an endpoint identifier in the form `provider/model` (auto-resolved when
only one action exists) or `provider/model/action`.

**4. Inspect its parameters**

```bash theme={null}
carrothub params alibaba/wan2.6-t2i
```

The output lists every flag, its type, whether it is required, default
values, and enum choices.

**5. Run it**

```bash theme={null}
carrothub run alibaba/wan2.6-t2i \
  --prompt "A serene mountain lake at sunset, photorealistic" \
  --size "1280*1280"
```

The CLI submits the task, polls until the result is ready, and prints the
asset URLs.

## Three more recipes

**Text-to-Video**

```bash theme={null}
carrothub run alibaba/wan2.6-t2v \
  --prompt "A golden retriever running on a beach at sunrise" \
  --duration 10 \
  --audio
```

**Image-to-Video** (local file path is auto-converted to base64)

```bash theme={null}
carrothub run alibaba/wan2.6-i2v \
  --image ./photo.png \
  --prompt "Slow cinematic push-in, clouds drifting" \
  --resolution "1080P"
```

**Text-to-Image** (OpenAI GPT Image 2)

```bash theme={null}
carrothub run openai/gpt-image-2/generation \
  --prompt "A vector logo of a fox, flat style" \
  --size "1024x1024"
```

## What you got

By default `run` blocks until the task completes and prints something like:

```
Creating task at /vendors/alibaba/v1/wan2.6-t2i/generation...
[12s] status: queued
[32s] status: running
[52s] status: succeeded

Task ID: 9d2b8...
Status:  succeeded

Results:
  https://cdn.carrothub.ai/.../image-0.png
```

Add `--json` to get a machine-readable payload, or `--no-wait` to return as
soon as the task is queued and check on it later with
[`carrothub status`](https://www.carrothub.ai/docs/cli/commands/status).

## Next

* Read through the [command reference](https://www.carrothub.ai/docs/cli/commands/list.md) to learn every flag.
* Browse the [model cheatsheet](https://www.carrothub.ai/docs/cli/models.md) to find the right endpoint.
* Skim [Workflows](https://www.carrothub.ai/docs/cli/workflows/async-tasks.md) for async batching, jq pipelines,
  and CI patterns.


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