generate_feature
Dispatch AI test generation for a feature. Returns immediately with a requestId; the pipeline runs in a cloud sandbox for several minutes.
warning
Generation consumes account credits. One generation per feature at a time — a second dispatch while one is in flight returns 409 conflict.
Request
POST /api/v1/ops/projects/{project}/features/{feature}/generate
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project | path | string | yes | The project's public id. |
feature | path | string | yes | Feature id or name. |
siteUrl | body | string | no | Test site URL override (defaults to the project's configured URL). |
- cURL
- CLI
- MCP
curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" -d '{}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/features/12/generate"
testvibe generate "Login Functionality" --watch
Tool generate_feature — { "feature": "Login Functionality" }. Follow with wait_for_generation.
Response
202 Accepted
{ "requestId": "a1b2c3d4-…", "featureId": 12 }
The feature's status flips to generating; track progress via get_generation_status and land on generated or failed.
Errors
| HTTP | When |
|---|---|
404 not_found | No such feature in this project. |
409 conflict | Already generating, or the dispatch was rejected. |