AI Features
Routemage integrates with OpenAI (gpt-4o-mini) to generate documentation and test cases directly from your request configuration. Both features are available inside any open request — no setup beyond adding your OPENAI_API_KEY to the web app environment.
OPENAI_API_KEY to be set in the web app's environment variables. If the key is missing, the Generate buttons will return an error instead of calling OpenAI.Generate Documentation
Open any request and click the Docs tab. If the request already has documentation, the editor will show it. Click Generate with AI to let Routemage call OpenAI and write full markdown documentation for that endpoint.
What gets generated
The AI generates a markdown document that typically includes:
- Endpoint overview — what it does, who it's for
- Query parameters table — name, type, required/optional, description
- Request headers — with notes on auth headers
- Request body example — formatted JSON or form data
- Success response example — with realistic field values
- Error response examples — 400, 401, 404, 500 patterns
https://api.example.com/users/123/orders with a JSON body produces much richer docs than a bare {{baseUrl}}/endpoint.Generate Test Cases
Open any request and click the Scripts tab. Click Generate with AI to have Routemage create a set of test cases for that endpoint. Each test case includes a name, type badge, description, any request overrides, and a list of assertions.
Test case types
Assertion types
Each test case can have one or more assertions. Routemage evaluates them when you run the test:
Running Tests
Each test case card has a Run button. Click it to send the request (with any overrides from the test case) through the Routemage proxy and evaluate all assertions against the response.
Use Run All in the toolbar to execute every test case in sequence. Results appear inline on each card — a green PASS badge or red FAIL badge with status code and duration.
localhost unless you're running Routemage locally). Environment variable substitution is not applied during test runs — use literal values.Downloading Results
After running one or more tests, a Download Results button appears in the Scripts toolbar. Clicking it downloads a test-results.json file containing all test cases and their run results.
The JSON structure is an array of objects, one per test case:
id,name,type,description— the test case metadataoverrides— any body/params/headers applied for this testassertions— the assertion rulesresult—nullif not run, otherwise:status(pass/fail/error),actualStatus,actualBody,assertions(with actual vs expected),durationMs
Routemage · API Development Platform