---
title: generation_failed — Cascade generation failed
description: "HTTP 422 generation_failed: designer failure, e.g. \"We couldn't reach the cascade designer. Please try again.\""
canonical_url: "https://cascades.crscreditapi.com/docs/api/errors/generation_failed"
doc_version: "1.0.0"
last_updated: "2026-10-09T18:04:24Z"
http_status: 422
source: config/api_error_codes.yml
---

# `generation_failed` — Cascade generation failed

**HTTP 422 Unprocessable Content**

Message: "<designer failure, e.g. "We couldn't reach the cascade designer. Please try again.">"

Envelope schema: `ErrorEnvelope` in [openapi.json](https://cascades.crscreditapi.com/openapi.json#/components/schemas/ErrorEnvelope) ([YAML](https://cascades.crscreditapi.com/openapi.yaml)).

## What causes it
- The designer rejected the prompt as off-topic or outside what a cascade can express (the message explains the rejection).
- The generated definition failed validation even after the automatic repair pass; `details[]` lists the errors on `definition`.
- No data products are enabled for the account, so there is nothing to ground a live cascade in.
- The model could not be reached or returned an unexpected response. These are transient; the message says to try again.

## How to fix it
1. Reword the prompt to name the screening products and the decision rules explicitly; short, concrete prompts generate cleaner cascades.
2. Send `create: false` to preview the generated definition and warnings, adjust, then create it with `POST /workflows`.
3. Retry transient failures with backoff; if products are the problem, enable them on the account first.

## Operations that return it
- [POST /workflows/generate](/docs/api/workflows/generate-workflow) — Generate a workflow from a prompt

## Example response

```http
HTTP/1.1 422 Unprocessable Content
Content-Type: application/json
```

```json
{
  "error": {
    "code": "generation_failed",
    "message": "We couldn't reach the cascade designer. Please try again.",
    "details": [
      {
        "field": "definition",
        "message": "node \"decision_1\" references unknown input \"credit_score\""
      }
    ],
    "request_id": "6f1c2a3e-8d4b-4c5e-9f0a-1b2c3d4e5f60",
    "doc_url": "https://cascades.crscreditapi.com/docs/api/errors/generation_failed"
  }
}
```

## Related
- [/docs/guides/ai-generate-a-cascade](/docs/guides/ai-generate-a-cascade)

[All error codes](https://cascades.crscreditapi.com/docs/api/errors.md)

## Sitemap

See the full [sitemap](https://cascades.crscreditapi.com/sitemap.md) for all pages.
