> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Comfy Router model schemas and results

> Fetch a Router model's OpenAPI input and output schema, cache it with ETags, and read the model's native result shape.

Each Router model accepts its own native request body and returns its own native result. Read the model's schema to learn both.

## Read input and output schemas

Each model exposes a standalone OpenAPI document:

```bash theme={null}
curl --dump-header schema-headers.txt \
  -H "X-API-Key: $COMFY_API_KEY" \
  https://api.comfy.org/v2/models/bfl/flux-2-pro/openapi.json
```

Within the model operation, `requestBody` describes the input, and the `200` response describes the output when an output schema has been authored. Input validation and output documentation are different: Router validates against its input schema but does not validate the returned provider result against its output schema.

Inspect the output media type as well as its fields. An unauthored output can use `*/*`, and some models return binary data rather than JSON.

### Cache a schema

Save the schema and its `ETag`. On a later schema fetch, pass that ETag in `If-None-Match`. A `304` has no body; keep the cached document. A `200` supplies a replacement document and ETag.

```bash theme={null}
curl -H "X-API-Key: $COMFY_API_KEY" \
  -H 'If-None-Match: "previous-etag-value"' \
  https://api.comfy.org/v2/models/bfl/flux-2-pro/openapi.json
```

The schema route uses `Cache-Control: private, must-revalidate`. Keep authenticated responses out of shared caches. This ETag/304 behavior applies only to the schema endpoint.

## Validation and fallback schemas

An authored input schema rejects invalid fields before the provider call with `422` and a `detail[]` array. Read the field paths in `loc`; see [validation errors](/development/comfy-router/errors#validation-errors).

Some schemas accept any JSON object and set `x-comfy-input-schema-authored: false`. Router forwards those requests without model-specific validation, so the provider can still reject them.

## Read the result

Router returns each model's terminal result shape. There is no common image, video, or text envelope: BFL image output uses `result.sample`, while other models can return URL lists or inline bytes.

Some asset URLs are rehosted by Comfy; others remain provider URLs or inline bytes. Check [result assets](/development/comfy-router/reference#result-assets) and download expiring assets promptly. Replays do not renew URLs.

## Next

* [Queued requests](/development/comfy-router/queue): submit a run and collect the result later.
* [Errors and retries](/development/comfy-router/errors): handle failures without paying twice.
