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

# Use Photon Flash 1 with Comfy Router

> Call luma/photon-flash-1 through Comfy Router: endpoint, request shape and the response Router returns.

API Reference for `luma/photon-flash-1`, served by Comfy Router from Luma.

## Quick start

Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) and export it as `COMFY_API_KEY`. The Python and TypeScript snippets use the Comfy SDKs (`pip install comfy-sdk`, `npm install @comfyorg/sdk`); the cURL snippet is the same call over raw HTTP.

**Model ID:** `luma/photon-flash-1`

**Endpoint:** `POST https://api.comfy.org/v2/models/luma/photon-flash-1`

<CodeGroup>
  ```python Python theme={null}
  from comfy_sdk import Comfy

  # Reads COMFY_API_KEY from the environment. Each call sends a fresh
  # Idempotency-Key and waits up to 10 minutes for the finished result.
  with Comfy() as client:
      result = client.models.run(
          "luma/photon-flash-1",
          {
              # Request fields are the provider's own — see Input below.
          },
      )

  print(result)
  ```

  ```typescript TypeScript theme={null}
  import { comfy } from "@comfyorg/sdk";

  // Reads COMFY_API_KEY from the environment. Each call sends a fresh
  // Idempotency-Key and waits up to 10 minutes for the finished result.
  const { data } = await comfy.models.run("luma/photon-flash-1", {
    // Request fields are the provider's own — see Input below.
  });

  console.log(data);
  ```

  ```bash cURL theme={null}
  # Request fields are the provider's own — see Input below.
  curl https://api.comfy.org/v2/models/luma/photon-flash-1 \
    -H "X-API-Key: $COMFY_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)" \
    -H "Content-Type: application/json" \
    -d '{}'
  ```
</CodeGroup>

## Schema

### Input

<Note>
  Router has not published an authored input schema for this model yet: `GET /v2/models/luma/photon-flash-1/openapi.json` returns an open object with `x-comfy-input-schema-authored: false`. Router forwards the body to Luma unchanged, so [Luma's own API reference](https://docs.lumalabs.ai/docs/api) is authoritative for the request fields, and nothing is validated server side.
</Note>

### Output

<ResponseField name="assets" type="object">
  The assets of an image generation. `image` is the result; `video` and `progress_video` belong to the Dream Machine VIDEO operation, which shares this status route, and Luma sends them here as explicit nulls.
</ResponseField>

<ResponseField name="assets.image" type="string (uri)">
  The URL of the generated image — the leaf a `luma/photon-*` generation fills. Null until the generation reaches `completed`.

  Format: `uri`
</ResponseField>

<ResponseField name="assets.progress_video" type="string (uri)">
  Always null on an image generation; it is the in-flight preview Luma publishes while a VIDEO generation runs.

  Format: `uri`
</ResponseField>

<ResponseField name="assets.video" type="string (uri)">
  Always null on an image generation; the `luma/ray-*` video models fill it instead.

  Format: `uri`
</ResponseField>

<ResponseField name="created_at" type="string (date-time)">
  The date and time when the generation was created

  Format: `date-time`
</ResponseField>

<ResponseField name="failure_reason" type="string">
  The reason for the state of the generation
</ResponseField>

<ResponseField name="generation_type" type="string">
  The type of the generation — always `image` on this operation

  Possible values: `image`
</ResponseField>

<ResponseField name="id" type="string (uuid)">
  The ID of the generation

  Format: `uuid`
</ResponseField>

<ResponseField name="model" type="string">
  The model used for the generation
</ResponseField>

<ResponseField name="request" type="object">
  The image generation request, echoed back inside the terminal document. Luma serialises every field of its request model, writing an explicit `null` into each one the caller did not set, so read a field's presence from its VALUE rather than from the key.
</ResponseField>

<ResponseField name="request.aspect_ratio" type="string" default="&#x22;16:9&#x22;">
  The aspect ratio of the generation

  Possible values: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, `9:21`
</ResponseField>

<ResponseField name="request.callback_url" type="string (uri)">
  The callback URL for the generation

  Format: `uri`
</ResponseField>

<ResponseField name="request.character_ref" type="object" />

<ResponseField name="request.character_ref.identity0" type="object">
  An image identity as it comes BACK inside the terminal document. Same shape as `LumaImageIdentity`, with its members nullable for the reason `LumaImageRefEcho` gives.
</ResponseField>

<ResponseField name="request.character_ref.identity0.images" type="string (uri)[]">
  The URLs of the image identity
</ResponseField>

<ResponseField name="request.generation_type" type="string">
  Always `image` when set, echoing the operation. Null when the caller did not send one, for the reason this whole echo object exists.
</ResponseField>

<ResponseField name="request.image_ref" type="object[]">
  An image reference as it comes BACK inside the terminal document. Same shape as `LumaImageRef`, with each member nullable because Luma echoes an unset one as an explicit `null` rather than omitting it.
</ResponseField>

<ResponseField name="request.image_ref[].url" type="string (uri)">
  The URL of the image reference

  Format: `uri`
</ResponseField>

<ResponseField name="request.image_ref[].weight" type="number">
  The weight of the image reference
</ResponseField>

<ResponseField name="request.model" type="string" default="&#x22;photon-1&#x22;">
  The image model used for the generation

  Possible values: `photon-1`, `photon-flash-1`
</ResponseField>

<ResponseField name="request.modify_image_ref" type="object">
  A modify-image reference as it comes BACK inside the terminal document. Same shape as `LumaModifyImageRef`, with its members nullable for the reason `LumaImageRefEcho` gives.
</ResponseField>

<ResponseField name="request.modify_image_ref.url" type="string (uri)">
  The URL of the image reference

  Format: `uri`
</ResponseField>

<ResponseField name="request.modify_image_ref.weight" type="number">
  The weight of the modify image reference
</ResponseField>

<ResponseField name="request.prompt" type="string">
  The prompt of the generation
</ResponseField>

<ResponseField name="request.style_ref" type="object[]">
  An image reference as it comes BACK inside the terminal document. Same shape as `LumaImageRef`, with each member nullable because Luma echoes an unset one as an explicit `null` rather than omitting it.
</ResponseField>

<ResponseField name="request.style_ref[].url" type="string (uri)">
  The URL of the image reference

  Format: `uri`
</ResponseField>

<ResponseField name="request.style_ref[].weight" type="number">
  The weight of the image reference
</ResponseField>

<ResponseField name="state" type="string">
  The state of the generation

  Possible values: `queued`, `dreaming`, `completed`, `failed`
</ResponseField>

## Examples

### Output

```json theme={null}
{
  "assets": {
    "image": "https://example.invalid/luma/photon-1/generated.png",
    "progress_video": null,
    "video": null
  },
  "created_at": "2027-01-01T00:00:00Z",
  "failure_reason": null,
  "generation_type": "image",
  "id": "5e8b06d7-91c4-4a2f-8b3d-6f7a8b9c0d1e",
  "model": "photon-1",
  "request": {
    "aspect_ratio": "1:1",
    "callback_url": null,
    "character_ref": null,
    "generation_type": "image",
    "image_ref": null,
    "model": "photon-1",
    "modify_image_ref": null,
    "prompt": "a red circle on a plain white background",
    "style_ref": null
  },
  "state": "completed"
}
```

## Before you ship

The snippets above are the shortest working call. Three things are the same for every model and are documented once on the [Comfy Router headers](/development/comfy-router/headers) page: send an `Idempotency-Key` on every paid call and reuse it when you retry, expect the connection to be held up to Router's 10 minute deadline, and keep `X-Comfy-Request-Id` from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, `X-Comfy-Error-Type` names the bucket, and a `422` means the body failed the model's schema and was never billed.

<CardGroup cols={3}>
  <Card title="Headers" icon="list" href="/development/comfy-router/headers">
    Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
  </Card>

  <Card title="Quick Start" icon="rocket" href="/development/comfy-router/quickstart">
    Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
  </Card>

  <Card title="Limitations" icon="triangle-exclamation" href="/development/comfy-router/limitations">
    What Router does not do today, and what to use instead.
  </Card>
</CardGroup>
