# API Mock Response Generator

> API Mock Response Generator is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-09-15).

Generates a realistic mock API response with proper headers, status codes, and schema-matching body data for a given URL and method.

## Facts

- Endpoint: GET https://api.strale.io/x402/api-mock-response
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 1
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-99b02560
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wne1QM-hUf6FPBhGgQQv7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-strale-io-99b02560
```

Example prompt: Can you generate a realistic mock GET response for https://api.example.com/users/123 with a 200 status code and a response schema that includes id, name, and email fields?

## When to prefer this

Use this endpoint when you need a realistic, schema-matching mock API response for a specific URL and HTTP method during development or testing, especially when you want body data that conforms to a given JSON schema. Prefer this over hand-crafting mock data when you need plausible, varied fake responses quickly without setting up a full mock server.

## Known failure modes

- Invalid or missing URL in queryParams returns a 400 error
- Unsupported HTTP method (e.g. POST, PUT) returns a validation error since only GET, HEAD, DELETE are allowed
- Malformed response_schema object may result in a generic or empty body
- Network or service unavailability returns a 5xx error
- Payment not provided or invalid returns a 402 Payment Required

## How this service works

Generate a realistic mock API response with proper headers, status codes, and schema-matching body data.

## Output

Returns a realistic mock HTTP response including properly structured body data matching any provided JSON schema, appropriate headers, and the requested status code — suitable for use in tests, stubs, or development environments.

## Example request

```json
{
 "url": "https://api.example.com/users/123",
 "method": "GET",
 "status_code": 200,
 "response_schema": {
  "type": "object",
  "required": [
   "id",
   "name",
   "email"
  ],
  "properties": {
   "id": {
    "type": "integer"
   },
   "name": {
    "type": "string"
   },
   "email": {
    "type": "string"
   }
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "method": {
       "type": "string"
      },
      "status_code": {
       "type": "integer"
      },
      "response_schema": {
       "type": "object"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-99b02560/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
