Example Payload Generator
schema.generate_example_payload
Overview
You send a JSON Schema and we build one example document from it, the same way every time. Values come from the schema wherever it says something concrete — const, examples, default, enum — and fall back to a fixed placeholder per type otherwise, including sensible stand-ins for common string formats. We then check the result against your schema and tell you whether it passed, and we list every place a schema keyword chose the value. The output is a shape you can trust, not realistic-looking fake data.
Hand-written examples drift from the schema and a model-written one is a guess. You get a document derived from the contract itself, identical on every call.
Reliability
Deterministic: nothing here is random, so the same schema and options always give the same document. Values are chosen in this order: a $ref inside the document is followed first, then const wins, then the first entry of examples, then default, then the alphabetically first enum value by its JSON text, and only then a per-type placeholder. Placeholders are fixed: true for a boolean, the minimum (or one past an exclusive minimum, otherwise zero) for a number, and for a string either a format-specific stand-in or the word string padded to minLength. We reject the call, and an unchanged retry will not help, when schema is absent or not an object, when mode is anything other than complete or minimal, when maxDepth falls outside 1 to 64, or when maxArrayItems falls outside 0 to 100. An unrecognised schemaDialect does not reject the call; it just leaves validAgainstSchema false with a warning.
Context footprint
Depth stops at maxDepth and arrays at maxArrayItems, so a recursive or sprawling schema still comes back as a small document. A successful call costs 1 execution credit.
When to use it
When you need a concrete document that matches a schema, for documentation, a mock, or a test fixture.
When the values need to look real, or when you already have a payload and want it checked.
Scope
Non-goals
- We never invent realistic-looking or randomized fake data
- We never follow a $ref into another document or over the network
- We never check a payload you already have — that is schema.validate_json
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| schema | object | Yes | JSON Schema to build the example from, with local $ref only and at most 4096 properties. — unconstrained RFC 8259 JSON items. |
| schemaDialect | string | No | Dialect used when checking the built example: draft-07, 2019-09 or 2020-12; omit it for 2020-12. |
| mode | string | No | complete fills every declared property; minimal fills only required ones. Omit it for complete. |
| seed | integer | No | Reserved and currently ignored; omit it. Output is never randomized. |
| preferExamples | boolean | No | Whether to take schema examples and default before enum or a type placeholder; omit it for true. |
| maxDepth | integer | No | How many levels to generate, 1 through 64; omit it for 16. |
| maxArrayItems | integer | No | Ceiling on generated array length, 0 through 100; omit it for 1. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| payload | object | Yes | Example document shaped like the schema; a root with no usable type comes back as an empty object. |
| validAgainstSchema | boolean | Yes | True when the built payload validates against the schema under schemaDialect. |
| decisions | array | Yes | Values a schema keyword decided, 0 through 10000 closed {path, rule} objects; empty when only type placeholders were used. |
| warnings | array | Yes | Non-fatal advisory notices as 0 through 256 strings, each one sentence long; empty when nothing was worth flagging. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"schema.generate_example_payload","input":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"}}}}},"required":["orderId"]},"mode":"complete","maxArrayItems":2}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("schema.generate_example_payload", {"mode":"minimal","schema":{"required":["id"],"type":"object","properties":{"id":{"type":"string"}}}});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- We never invent realistic-looking or randomized fake data
- We never follow a $ref into another document or over the network
- We never check a payload you already have — that is schema.validate_json
- Producing believable test data with real-looking names, amounts, or dates
- Checking a payload you already have against a schema
- Schemas whose definitions live in another document
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "schema.generate_example_payload",
"input": {
"mode": "minimal",
"schema": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
}
}Examples
Only the required fields, minimal mode
{
"mode": "minimal",
"schema": {
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
}{
"payload": {
"id": "string"
},
"validAgainstSchema": true,
"decisions": [],
"warnings": []
}Allowed values and a formatted string
{
"schema": {
"required": [
"status",
"contactEmail"
],
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"active",
"pending",
"suspended"
]
},
"contactEmail": {
"type": "string",
"format": "email"
}
}
}
}{
"payload": {
"status": "active",
"contactEmail": "[email protected]"
},
"validAgainstSchema": true,
"decisions": [
{
"rule": "enum",
"path": "/status"
}
],
"warnings": []
}Recommended use cases
- Fill the example section of your API docs with something that actually fits
- Seed a contract test or a mock endpoint straight from the schema
- Show an agent the exact shape it needs to produce before it starts filling values
Avoid for
- Producing believable test data with real-looking names, amounts, or dates
- Checking a payload you already have against a schema
- Schemas whose definitions live in another document
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.