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

# Quickstart

> Submit a video and retrieve its Galileo evaluation.

## 1. Create an API key

Create a key in the [Playground](https://playground.physionlabs.ai/api-keys), then store it in an environment variable.

```bash theme={null}
export GALILEO_API_KEY="gk_live_..."
```

Keep the key on your server and out of browser code, source control, and logs.

## 2. Submit an evaluation

Use a public MP4 URL and the prompt that generated the video.

<Note>
  Current release candidates: TypeScript `0.1.0-rc.4` and Python `0.1.0rc4`.
  The public API may change before 0.1.0.
</Note>

<Tabs>
  <Tab title="TypeScript">
    ```bash theme={null}
    npm install @physionlabs/galileo@next
    ```

    ```ts theme={null}
    import Galileo from "@physionlabs/galileo";

    const galileo = new Galileo({ apiKey: process.env.GALILEO_API_KEY });

    const evaluation = await galileo.evaluations.createAndWait({
      prompt: "A red ball rolls off a table and bounces twice.",
      video: { url: "https://example.com/video.mp4" },
    });

    if (evaluation.status === "failed") {
      console.error(evaluation.error?.message);
    } else {
      console.log(evaluation.result?.summary);
    }
    ```
  </Tab>

  <Tab title="Python">
    ```bash theme={null}
    pip install --pre physionlabs
    ```

    ```python theme={null}
    import os

    from physionlabs import Galileo

    galileo = Galileo(api_key=os.environ["GALILEO_API_KEY"])

    evaluation = galileo.evaluations.create_and_wait(
        prompt="A red ball rolls off a table and bounces twice.",
        video={"url": "https://example.com/video.mp4"},
    )

    if evaluation.status.value == "failed":
        print(evaluation.error.message if evaluation.error else "Evaluation failed")
    elif evaluation.result:
        print(evaluation.result.summary)
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.physionlabs.ai/v1/evaluations \
      --request POST \
      --header "Authorization: Bearer $GALILEO_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "prompt": "A red ball rolls off a table and bounces twice.",
        "video": { "url": "https://example.com/video.mp4" }
      }'
    ```
  </Tab>
</Tabs>

The SDK helpers submit the evaluation and poll until it settles. The cURL request
returns immediately with a `queued` evaluation and its `id`.

## 3. Retrieve the result

The SDK helpers poll with exponential backoff. They return when the status reaches `completed`, `partial`, or `failed`. With HTTP, retrieve the evaluation until it reaches one of the same terminal states.

```bash theme={null}
curl https://api.physionlabs.ai/v1/evaluations/<evaluation_id> \
  --header "Authorization: Bearer $GALILEO_API_KEY"
```

```json theme={null}
{
  "id": "019f6c31-7cec-7448-8085-5d083b4c3e80",
  "object": "evaluation",
  "model": "galileo",
  "model_version": "0.1",
  "output_schema_version": "evaluation-schema-2026-06-01",
  "created": 1787856000,
  "status": "completed",
  "input": {
    "prompt": "A red ball rolls off a table and bounces twice.",
    "video": {
      "duration_sec": 3.0,
      "width": 1280,
      "height": 720,
      "fps": 24,
      "num_frames": 72
    }
  },
  "usage": {
    "video_seconds": 3.0,
    "billable_units": 32
  },
  "result": {
    "glitches": [
      {
        "id": "finding_01",
        "type": "visual_glitch",
        "description": "The ball passes through the table surface.",
        "region": {
          "start": { "frame": 29, "sec": 1.208, "timecode": "00:00:01:05" },
          "end": { "frame": 43, "sec": 1.792, "timecode": "00:00:01:19" },
          "boxes": []
        }
      }
    ],
    "summary": {
      "num_glitches": 1,
      "has_visual_glitch": true,
      "has_prompt_misalignment": false
    }
  },
  "error": null,
  "timing": {
    "e2e_ms": 43000
  }
}
```

<Card title="Analyze a video URL" icon="arrow-right" href="/guides/analyze-video-url">
  Build the full asynchronous evaluation flow.
</Card>
