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

# Quickstart

> From concept to content in minutes. Pick a transport, authenticate, generate, poll.

From concept to content in minutes. Pick the transport that matches how you work: an agent host with MCP, a shell with the CLI, or raw HTTP.

## 1. Get an API key

Create a key in the ContentHero app under **Settings, API Keys**. Keys are scope-gated; for generation, grant the generate scopes. Treat the key like a password.

<Warning>
  Never paste an API key into an agent chat. The CLI and MCP handle keys for you. See [Authentication](/authentication/api-keys).
</Warning>

## 2. Connect a transport

<Tabs>
  <Tab title="MCP">
    Add the hosted server to your agent host. It authenticates over OAuth, so there is no key to manage.

    ```json theme={null}
    {
      "mcpServers": {
        "contenthero": {
          "url": "https://mcp.contenthero.ai"
        }
      }
    }
    ```

    Your host walks you through the OAuth consent once. After that, the ContentHero tools appear as `mcp__contenthero__*`. See [MCP setup](/mcp/overview) for per-host instructions.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    npm install -g @contenthero/cli
    contenthero login        # browser-assisted, provisions and stores a key
    contenthero auth status  # exits 0 when authenticated
    ```

    The CLI stores the key at `~/.contenthero/credentials` (mode 0600). You can also set `CONTENTHERO_API_KEY` in the environment. See [CLI setup](/cli/overview).
  </Tab>

  <Tab title="Raw API">
    ```bash theme={null}
    export CONTENTHERO_API_KEY="ch_live_..."
    curl https://app.contenthero.ai/api/v1/account/balance \
      -H "Authorization: Bearer $CONTENTHERO_API_KEY"
    ```

    A `200` with your credit balance confirms the key works.
  </Tab>
</Tabs>

## 3. Preview the cost

Every spend can be previewed for free before you commit.

<Tabs>
  <Tab title="MCP">
    Call `generate_image` with `getCost: true`. It returns the price and charges nothing.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    contenthero generate image --prompt "a marble bust of an owl, studio light" --cost
    ```
  </Tab>
</Tabs>

## 4. Generate

<Tabs>
  <Tab title="MCP">
    Call `generate_image` with a `prompt` and a `modelId`. The available models are the `modelId` enum on the generate tools, resolved live from the registry. The call smart-waits about 50s, then returns the asset or an `outputId` to poll.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    contenthero generate image \
      --prompt "a marble bust of an owl, studio light" \
      --model nano-banana-2
    ```

    Run `contenthero model list` to see the live roster.
  </Tab>

  <Tab title="Raw API">
    ```bash theme={null}
    curl https://app.contenthero.ai/api/v1/studio/generate \
      -H "Authorization: Bearer $CONTENTHERO_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"type":"image","prompt":"a marble bust of an owl, studio light","modelId":"nano-banana-2"}'
    ```
  </Tab>
</Tabs>

## 5. Poll if it is still rendering

If the render outlasts the smart-wait, you get an `outputId`. Poll it.

<Tabs>
  <Tab title="MCP">
    Call `get_generation_status` with the `outputId` for a snapshot, or `wait_for_generation` to block until it is done.
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    contenthero generation wait <outputId>
    ```
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Chain into video" icon="film" href="/guides/generate">
    Feed the image's output id straight into `generate_video` as a start frame.
  </Card>

  <Card title="Run the full pipeline" icon="diagram-project" href="/guides/pipeline">
    Ground a post in your voice, produce the media, and schedule it.
  </Card>

  <Card title="Install the skills" icon="robot" href="/skills/overview">
    Let your agent drive all of it with the official workflows.
  </Card>

  <Card title="Browse the recipes" icon="book-open" href="/cookbook/overview">
    End-to-end chains you can copy.
  </Card>
</CardGroup>
