---
title: "Generate test cases"
method: POST
path: "/simulation_cases/generate"
---

# Generate test cases

`POST /simulation_cases/generate`

Generate test cases for an agent. Supports both custom prompt and flow designer agents. You can optionally specify scenarios to ensure the generated tests cover specific situations. The response is streamed as NDJSON, providing progress and results incrementally.

## Headers

- `Authorization` string, required

## Request body

- SimulationCaseGenerateIn — Input payload to generate simulation cases.
  - `agent_id` string, required — ID of the agent used to generate cases.
  - `suite_id` string, uuid — ID of the simulation suite to add generated cases to.
  - `include_tests` SimulationCaseGenerateInIncludeTestsItems[], required — Tests to include in the generated cases.

## Response `200`

200

- string

## Other responses

- `400` — 400
- `404` — 404
- `422` — 422

## Changes

- **2026-08-22** `292b6010eb31` — 1 info
  - api tag `` removed

[Change history](https://skmtc.dev/synthflow/apis/platform-api/changes/simulation_cases/generate/post.md)

---

[API](https://skmtc.dev/synthflow/apis/platform-api.md) · [All operations](https://skmtc.dev/synthflow/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/synthflow/platform-api/revisions/6976456ad422/schema)
