# DDG Schema Infer

> DDG Schema Infer is a paid API for AI agents from agents.daedalusdevelopmentgroup.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-17).

Infers and returns a structured schema for a given HTTP request/response example pair

## Facts

- Endpoint: POST https://agents.daedalusdevelopmentgroup.com/v1/schema-infer?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ddg-schema-infer-721749a0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sA8LIh7Q8Tq3QF_dM76Vw

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 ddg-schema-infer-721749a0 -d '<json body>'
```

Example prompt: I have a POST endpoint that accepts a JSON body like {"name":"Alice","age":30} and returns {"ok":true} — can you infer the JSON schema for that request and response?

## When to prefer this

Choose this endpoint when you need to automatically derive a structured JSON schema from example HTTP request/response pairs without manually writing schema definitions. Particularly useful for documenting undocumented APIs, validating webhook payloads, or bootstrapping OpenAPI specs. Prefer this over manual schema authoring or general-purpose LLM prompting when you want a machine-payable, deterministic schema extraction with a defined cost of $0.002 USDC per call.

## Known failure modes

- Missing required fields (input or output) returns a validation error
- Malformed or non-JSON body type mismatch causes inference failure
- Unsupported HTTP method (e.g. GET) is rejected by the const/enum constraint
- Empty or null example body may produce a minimal or incomplete schema
- Payment failure via x402 will return a 402 response before processing occurs

## How this service works

DDG agent-payable service request

## Output

Returns a JSON object with ok:true and an inferred schema definition derived from the provided HTTP request body and response example, including field types and required field lists.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": true
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "ok": true
    }
   },
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ddg-schema-infer-721749a0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.daedalusdevelopmentgroup.com](https://www.zero.xyz/host/agents.daedalusdevelopmentgroup.com/llms.txt)
