---
title: "Refine test description"
method: POST
path: "/api/apps/{app_id}/testing-agent/refine"
---

# Refine test description

`POST /api/apps/{app_id}/testing-agent/refine`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Turns a rough description into a test name and a goal the testing agent can follow. Nothing is saved. Pass the result to [Create test](/api-reference/create-test) to add it.

This makes an AI call and usually answers within a few seconds. It's billed by the length of `description`, so it usually costs a fraction of a credit. The call is refused when the workspace is out of credits.

This is limited to 20 requests per minute per caller for each app. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. Read-only keys and workspace API keys are refused.</Note>

## Path parameters

- `app_id` string, required — ID of the app.

## Request body

- RefineFlowRequest
  - `description` string, required — Rough description of what to test, in your own words.

## Response `200`

The suggested name and goal.

- RefinedTestDescription — A test name and goal written from a rough description.
  - `name` string, required — Short name for the test.
  - `goal` string, required — The goal, rewritten as steps the testing agent can follow.

## Other responses

- `400` — The workspace is out of credits.
- `401` — Missing or invalid credentials.
- `403` — You don't have editor access to this app, the app is blocked, or your API key is read-only or a workspace API key.
- `404` — App not found.
- `409` — Your workspace requires an unlocked SSO session.
- `422` — Validation Error
- `429` — Rate limit exceeded.

## Changes

> 28 revisions in range; 1 not diffed.

- **2026-10-06** `dddf17e0f9f0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/testing-agent/refine/post.md)

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adexad/apis/base44-app-management-api/revisions/99df85f579f9?raw)
