> ## 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.

# API reference

> Authentication, base URL, and conventions for the Galileo API.

## Base URL

```text theme={null}
https://api.physionlabs.ai/v1
```

## Authentication

Send the API key as a bearer token to authenticated API endpoints.

```http theme={null}
Authorization: Bearer gk_live_...
```

## Conventions

* Send and receive JSON unless an upload endpoint requests video bytes.
* Include an API error's `request_id` when contacting support.
* Treat evaluations as asynchronous jobs.
* Stop polling at `completed`, `partial`, or `failed`.
* Read `Retry-After` before retrying a rate-limited request.

## Findings

`result.glitches` holds one entry per finding. Both kinds carry `id`, `type` and
`description`; the rest depends on `type`, so branch on it.

| field            | `visual_glitch`                         | `prompt_misalignment`                 |
| ---------------- | --------------------------------------- | ------------------------------------- |
| `region`         | where in the clip, with per-frame boxes | —                                     |
| `prompt_segment` | —                                       | the span of your prompt this is about |
| `severity`       | —                                       | 1-5                                   |

A field that does not apply is **absent**, not null, so a visual glitch has no
`severity` key at all. Both SDKs model this as a union you narrow on `type`:

<CodeGroup>
  ```ts TypeScript theme={null}
  if (finding.type === "prompt_misalignment") finding.severity;
  else finding.region;
  ```

  ```python Python theme={null}
  if finding.type == "prompt_misalignment":
      finding.severity
  else:
      finding.region
  ```
</CodeGroup>

`severity` says how far a prompt requirement was from being realized: **1 is a
minor mismatch and 5 means the requirement is absent entirely.** It reads in the
opposite direction from a score, which is the one thing worth getting right
before you threshold on it. Every finding you receive already cleared our
reporting threshold.

```json theme={null}
{
  "id": "gl_pm_r2",
  "type": "prompt_misalignment",
  "severity": 2,
  "description": "Action of washing a dirty white plate \u2014 The plate is dirty and white, and the robot holds it under water, but the 'washing' action is mostly just rinsing under the tap rather than scrubbing or using soap, though the prompt doesn't specify scrubbing.",
  "prompt_segment": {
    "text": "wash a dirty white plate",
    "char_start": 12,
    "char_end": 36
  }
}
```

## How long a run took

Every evaluation carries `timing`, and `timing.e2e_ms` is the only number in it:
milliseconds from your submission to the terminal answer, which is what you
waited — our queueing, fetching the video, and the model's own time included.

```json theme={null}
{ "timing": { "e2e_ms": 43000 } }
```

`null` when nothing was measured, which is every run settled before we recorded
it. Null and never 0: a run whose latency nobody recorded and a run that took no
time are different claims.

## Fields not described here

A response may contain fields this reference does not name. They are not part of
the v1 surface, they can change or disappear without a version bump, and the SDKs
drop them rather than surfacing them — the Python client does not put them in
`model_extra`. Read what is documented.

`GET /v1/status` accepts unauthenticated requests. Upload PUT requests use a temporary upload URL and do not receive the Galileo API key.

The endpoint pages in this section are generated from the Galileo v1 OpenAPI contract. The Node.js and Python SDK types come from the same contract revision.
