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

# Quickstart

> Create a scoped key, start a cloud browser task, and recover the completed result.

This quickstart uses the REST API so it works before the SDK packages reach their registries. You will create a server-side key, start a browser task, and poll the durable run until it finishes.

## Prerequisites

* An Infragrid workspace
* Permission to manage developer API keys
* `curl` and `jq`

<Warning>
  An Infragrid API key is a server credential. Run these commands in a trusted terminal or backend environment—never in browser JavaScript.
</Warning>

<Steps>
  <Step title="Create an API key">
    Open [Developer settings](https://app.infragrid.ai/dashboard/developers), choose the **Browser runs** preset, and create a key. Copy the `ig_live_…` value immediately; it is shown only once.
  </Step>

  <Step title="Export the credential">
    Store the key in your secret manager for production. For this terminal session:

    ```bash theme={null}
    export INFRAGRID_API_KEY="ig_live_..."
    ```
  </Step>

  <Step title="Start a browser task">
    Use a stable idempotency key for this logical request:

    ```bash theme={null}
    curl --request POST \
      --url https://api.infragrid.ai/v1/runs \
      --header "Authorization: Bearer $INFRAGRID_API_KEY" \
      --header "Content-Type: application/json" \
      --header "X-Idempotency-Key: quickstart-example-summary-v1" \
      --data '{
        "task": "Open example.com and summarize the page.",
        "metadata": { "source": "quickstart" }
      }'
    ```

    The API returns `202 Accepted` with a run whose status is usually `queued` or `running`.
  </Step>

  <Step title="Poll the durable run">
    Copy the returned `id` and request the run until it reaches `completed`, `failed`, or `cancelled`:

    ```bash theme={null}
    export INFRAGRID_RUN_ID="replace-with-run-id"

    curl --silent --show-error \
      --url "https://api.infragrid.ai/v1/runs/$INFRAGRID_RUN_ID" \
      --header "Authorization: Bearer $INFRAGRID_API_KEY" | jq
    ```
  </Step>
</Steps>

## Read the result

A completed run returns a bounded result:

```json theme={null}
{
  "id": "run-id",
  "status": "completed",
  "result": {
    "status": "completed",
    "summary": "Example Domain is a placeholder site used in documentation.",
    "steps": 3,
    "browser_actions": 1,
    "final_url": "https://example.com/",
    "outputs": {},
    "events": []
  },
  "step_count": 3
}
```

<CardGroup cols={2}>
  <Card title="Make the flow repeatable" icon="diagram-project" href="/guides/ordered-workflows">
    Build an ordered workflow with named outputs.
  </Card>

  <Card title="Use a published automation" icon="bolt" href="/guides/published-blueprints">
    Run an immutable Blueprint revision.
  </Card>

  <Card title="Add an SDK" icon="code" href="/sdks/typescript">
    Use the TypeScript or Python client after package release.
  </Card>

  <Card title="Review production behavior" icon="shield-check" href="/production/errors-retries">
    Handle retries, timeouts, and terminal failures.
  </Card>
</CardGroup>
