REAL PAYMENTSBase (chain id 8453) · USDC payments have real value. Paid upstream failures are not automatically refunded.
Agent & automation tools

JSON in. Schema and types out.

Infer JSON Schema and TypeScript types from examples, including optional fields and mixed types. Sample inference, not a verified contract.

For agents and automation workflows. Fixed example: no account required. Your own input: wallet sign-in, no USDC or payment signature.

Your first free call in three steps ↓

See a real example result

Calculated by the same tool engine on this fixed synthetic example. No account, payment or external provider call. Use the tool page to submit your own input.

Input · JSON

{
  "typeName": "Customer",
  "samples": [
    {
      "id": 1,
      "name": "Alpha",
      "active": true
    },
    {
      "id": 2,
      "name": "Beta"
    }
  ]
}

Output · JSON

Reveal the result to inspect the output format before using the tool.

Your first free result

From a sample to a starting contract.

For developers connecting agents, webhooks and automation workflows. Review a real example first, then bring your own synthetic JSON.

  1. 01 / Preview

    Inspect the fixed sample

    Two Customer objects produce a schema and TypeScript. The field missing from one sample becomes optional.

    Show me the example ↓
  2. 02 / Sign in

    Your wallet is your account

    Open the free tool, connect a browser wallet and sign the off-chain sign-in message. If prompted, create an account profile with a display name. No USDC, payment signature or transaction is needed for this free call.

    Open the free tool →
  3. 03 / Run once

    Use your own JSON

    Supply 1–100 samples, press Run free call and save the JSON result. Review the schema and types before using them as a contract.

    Get help with a request ID →
Integrating from code instead?

Create a limited key in Keys with tools:invoke and the json-types tool allowed. Keep it in your local environment, never in a prompt, URL or client bundle.

// Node.js 22+. Read your private key from the process environment.
const origin = "https://invokeport.com";
const key = process.env.INVOKEPORT_API_KEY;
if (!key) throw new Error("Set INVOKEPORT_API_KEY privately");
const attemptId = crypto.randomUUID(); // retain it if the response is uncertain
const response = await fetch(origin + "/api/tools/json-types", {
  method: "POST",
  headers: {
    "content-type": "application/json",
    authorization: "Bearer " + key,
    "idempotency-key": attemptId
  },
  body: JSON.stringify({
    typeName: "Customer",
    samples: [{ id: 1, name: "Alpha", active: true }, { id: 2, name: "Beta" }]
  })
});
const result = await response.json();
if (!response.ok) throw new Error(String(result.error));
console.log(result.typescript);

This example makes one request. For an unknown outcome, retain the attempt ID; do not automatically retry. Invalid input returns 400; a missing or revoked key returns 401; a tool outside the key policy returns 403.

What you receive

  • JSON Schema with inferred required and optional fields
  • TypeScript source with safe, quoted property names
  • Array and mixed-type inference with explicit limitations

Scope & limits

  • 1–100 samples, 128 KiB JSON, bounded nesting. Inference is not a verified contract.
  • Mixed types use anyOf, which is outside the bounded InvokePort validator subset. Review the output before adopting it.

Use it in your workflow

  1. Collect representative JSON examples.
  2. Sign in or use a scoped free API key.
  3. Download and review the generated schema and types.

API schemas and request examples are on the tool reference. Read the authentication and payment guide.

Your data & delivery

Submitted input and result bodies are not stored by InvokePort. Operational metadata and hashes may be recorded. Do not submit credentials or unnecessary personal data.

Free results are not retained for recovery. Save the returned JSON; do not automatically repeat a request with an unknown outcome.

Delivery problem? Contact support with the request ID.