Skip to main content

Generate with AI

Generate APIs with AI when you know the calls you need but do not want to browse the app or write each request by hand. Describe the flow in a prompt. QAlity builds the requests (method, path, headers, and body) so you can review, assert, and run them.

This is different from AI Step Generation, which writes UI test steps for a selected page element while you record. Here the output is HTTP requests, not clicks.

AI requests

Each API prompt generation counts toward your plan’s shared AI request quota (same pool as Auto-Heal, AI Step Generation, and Case Variations). Discover 50 / Pro 500 / Business 1000 per billing cycle. See Pro plan.

How to generate from a promptHow to generate from a prompt

1
Choose Prompt

In REST API testing, choose the prompt path for generating APIs with AI.

2
Describe the APIs

Write what the flow should cover in plain language. Include the product area, the actions, and any status you care about.

3
Generate

Submit the prompt. QAlity creates the request list from your description.

4
Review each request

Check method, URL, headers, and body. Remove anything you do not need and fill in auth or environment values.

5
Add assertions and run

Set expected status codes, then send one request or run the full flow. Results are stored in Execution History.

What to put in the promptWhat to put in the prompt

Be specific. A short, concrete prompt produces requests you can actually run.

Journey
Name the user path: checkout, login, update profile, cancel order.
Resources
Name the endpoints or resources: cart, orders, session, shipping quotes.
Methods
Say if you need GET, POST, PUT, PATCH, DELETE, or HEAD.
Outcomes
Call out expected status, such as 201 on create or 204 on delete.
Data
Mention SKUs, quantities, or fields that belong in the body or query.

Example prompt:

Generate API tests for checkout on https://shop.example.com. Include GET /api/products, POST /api/cart/items, PUT to update quantity, DELETE to remove an item, and POST /api/orders. Expect 200 on reads, 201 on creates, and 204 on delete.

After generationAfter generation

Generated requests are a starting point, not a finished test.

Review
Read each method, path, and body before you run.
Edit
Fix URLs, add Authorization headers, and align bodies with your environment. See Build a request.
Assert
Set the status you expect so a 500 cannot pass as success. See status codes.
Run
Execute whenever you need. Each run is saved in Execution History.
Combine with recording

Use a prompt when you already know the contract. Use Record from browser when you want the APIs the app actually fires, including ones that are easy to miss.