POST /v1/haywire/plan/preview

Tags: haywire

Request body

Required.

JSON
{
  "$ref": "#/components/schemas/PreviewRequest"
}

Responses

200 — Always 200. ready=true payload carries the plan + cost; ready=false payload carries the soft reason for the FE to render under the textarea.

JSON
{
  "$ref": "#/components/schemas/PreviewResponse"
}

400 — INVALID_REQUEST — structurally bad request (e.g. caller-supplied shards exceed the absolute cap).

503 — AGENT_UNAVAILABLE — planning gateway down.

Code samples

TypeScript

TypeScript
import { firecase } from "@firecase/sdk";

const result = await firecase.post("/haywire/plan/preview", { /* body */ });
console.log(result);

Python

Python
import firecase

result = firecase.post("/haywire/plan/preview", json={})
print(result)

curl

Bash
curl -X POST https://api.firecase.ai/v1/haywire/plan/preview \
  -H "Authorization: Bearer $FIRECASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'