Writing test cases is one of the most time-consuming parts of API development, as it needs to cover multiple scenarios, such as normal, abnormal, boundary, and security cases. Manually creating these cases usually takes a lot of time.
Fortunately, Apidog now supports automatic AI-generated test cases. Based on your API specs, Apidog's AI feature can intelligently create a complete set of test cases that cover a wide range of scenarios in seconds.
AI-Generated Test Cases in Action
1. One-Click Generation of Dozens of Test Cases
Click the Generate
button, and within seconds, you'll see dozens of fully structured test cases appear in your list.
2. Automatic Categorization by Test Type
Apidog's AI feature automatically classifies the generated test cases into categories such as positive, negative, boundary, and security tests.
3. Instant Run and Validation
You can run the generated test cases immediately and view the real-time endpoint responses. There's no need to wait for all test cases to finish generating — you can adopt the valid ones directly into your official test suite.

4. Bulk Operations for Efficient Management
Run, accept, or discard multiple test cases at once. This makes it faster to filter and keep only high-quality test cases.

5. Multi-Task Parallel Generation
You can launch several generation tasks simultaneously to compare the results and quality of different AI models.

Try it yourself in Apidog and experience how AI transforms your testing workflow!
How to Enable AI Features
Before you can use the AI Test Case Generation feature, a few simple setup steps are required.
By default, AI features in Apidog are turned off and need to be enabled manually.
- Permissions: You must be an organization or team admin (or higher) to configure this feature.
- Version: Make sure you've updated Apidog to the latest version.
- Enable Path: Go to
Organization / Team Settings
→AI Features
, and enable AI features for your organization or team. Once enabled, all projects within the team can access AI features.

Configure Model Providers
After enabling the AI features, you'll need to configure at least one model provider.
Apidog currently supports several model providers by default — including
OpenAI, Anthropic, Google Al studio, and Google Vertex — and also allows custom API configurations for other providers.

You'll need to provide the following details when configuring:
- API Key: Used for authentication when calling the AI endpoint. You can test to verify its validity.
- API Base URL: The endpoint for sending the requests. Predefined providers fill this automatically.
- Model List: Choose which models to activate. Only enabled models will be available in Apidog's AI features.

Pro Tip: For the best generation results, choose a powerful model. Less advanced models may produce unsatisfactory results.
Set Default Models and Activate AI-related Features
If you haven't specified a model for use, Apidog will automatically select one for you. You can also manually choose a specific model as the default one and enable AI-related features you need.

Once everything is configured and AI features are enabled, simply refresh your project, and you'll see the new AI features appear throughout the project interface.
How to Generate Test Cases with AI
In any endpoint's Test Cases tab, you'll find an entry labeled Generate with AI
.

Clicking it opens a side panel where you can select which types of test cases to generate — including positive, negative, boundary, and security types and their subcategories.

If the endpoint requires authentication, Apidog automatically detects and applies the credentials. Keys are encrypted locally, transmitted securely, and decrypted after generation, ensuring both functionality and security.

Before generation, you can add extra instructions in the bottom input box to make the AI output more aligned with your expectations.
- Set the number of test cases to generate (up to 80 per batch).
- Select which AI model to use

After you click Generate
, AI begins working based on your API specs and configuration. Generated test cases can be run instantly to verify API responses. Accept the cases that meet your needs or discard unwanted ones — and you can also manage multiple at once.
Note: The more detailed your API specs, the better your AI-generated test cases will be.
For example, if each enum value in your API specs includes clear explanations, Apidog's AI feature can automatically generate cases covering all possible enum values — even using Orthogonal Array Testing methods for optimal combinations.
In future versions, Apidog will support test data configuration in test cases, allowing AI to auto-generate and populate relevant test data, further improving testing efficiency.
More AI Features in Apidog
Beyond test case generation, Apidog's AI feature includes several other smart functions:
Modify Schemas with AI
Enable AI-assisted parameter modification
under Organization / Team Settings
→ AI Features
, then refresh your project.
Hover over a schema in the interface, and you'll see the AI feature icon appear — click it to let AI modify your schemas automatically.
Endpoint Compliance Check
Enable Endpoint compliance check
in AI Features
, then refresh your project. After setting up an API design guidelines, you can use AI to verify whether your APIs follow the rules.
AI naming
Enable AI Naming
under AI Features
, then refresh your project. When editing an endpoint or schema, hover over a field name area — the AI icon will appear, allowing AI to suggest standardized field names based on your team's naming conventions.
Conclusion
Apidog's AI Test Case Generation feature automatically creates a complete set of test cases covering normal, abnormal, boundary, and security scenarios. You can run, verify, and manage these cases instantly and in bulk—saving time, reducing repetitive work, and allowing testers to focus on logic validation and test strategy optimization. This greatly improves overall testing efficiency.
Beyond test case generation, Apidog also provides a range of AI-powered tools designed to simplify and accelerate your API development workflow. For step-by-step guidance, visit the Apidog Help Center.