Skip to content

AI Features ​

reqable can use AI to generate mock data and refine existing responses, reducing the work required to write JSON, adjust fields, and maintain test fixtures.

Configuration ​

Open Settings → AI model configuration and configure:

  1. An API protocol: OpenAI, Anthropic, or Gemini.
  2. The Base URL.
  3. The API Key.
  4. The model name.

TIP

Many providers, including DeepSeek, GLM, and MiniMax, expose OpenAI-compatible APIs. Select OpenAI and enter the Base URL and API Key supplied by your provider.

Entry points ​

Generate mocks during YApi import ​

After selecting interfaces from YApi, choose AI generation. reqable sends the endpoint path, method, request schema, response schema, and description as context.

This is useful when:

  • The YApi mock response has not been maintained.
  • The response contains many fields and would be slow to write manually.
  • You want to generate multiple mock rules in one operation.

Progress is shown while generation runs. A failed endpoint does not cancel successful items; all failures are summarized when the batch finishes.

Refine a response from the details view ​

Use Refine with AI in the response editor:

  1. Enter an instruction such as “Reduce the list to three items” or “Convert amount fields to integers.”
  2. The model streams an updated response.
  3. reqable displays a diff after generation.
  4. Accept or reject the result. The current mock is not overwritten automatically.

Demo ​

AI response refinement

INFO

Mocks imported from YApi retain the endpoint schema as AI context, so later refinements usually stay closer to the API definition.

Relationship to normal mocks ​

AI assists with data creation but does not change the underlying mock workflow:

  • Generated items remain normal mock rules.
  • You can still edit the response, match strategy, and capability switches manually.
  • Rules still support import, export, groups, enabling, and disabling.
  • If you do not want to use AI, import the existing YApi mock or create a rule manually.

Recommendations ​

  • Use YApi import plus AI generation when the endpoint definition is complete.
  • Use direct YApi mock import when YApi already contains stable mock data.
  • Use response refinement when a mock exists and only needs a focused change.

Released under the MIT License. · [Privacy Policy](/en/privacy) · [Terms of Service](/en/terms) · Contact: [arktomson99@gmail.com](mailto:arktomson99@gmail.com)