When a task fails, read the machine-readable FailureCode, not just the human message; the code tells you what to fix. If you are polling by hand, use the CLI's task get with wait and download flags instead of writing your own loop. And keep the key in the RUNWAY_API_KEY or RUNWAYML_API_SECRET environment variable so the CLI picks it up without flags.

Context: Third-party SDK docs (tryagi/runway, .NET client): failed tasks carry machine-readable failure codes, check taskDetail.Failed.FailureCode alongside the Failure message. Their CLI reads RUNWAY_API_KEY or RUNWAYML_API_SECRET by default, and task get supports wait plus download flags so you do not have to hand-roll the poll loop.