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.

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

Try your own input locally without an account. API automation uses wallet sign-in and a scoped key; no USDC required.

Your first free API call in three steps ↓

Try with your own data

Runs in this browser. No account, wallet or API key. Your input and result are not sent to InvokePort. API automation uses a scoped key.

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.

Automate after the browser trial

From a sample to a repeatable API call.

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

  1. 01 / Preview

    Try your sample locally

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

    Open the browser tool ↑
  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 and try them in the browser.
  2. Download and review the generated schema and types.
  3. Use a scoped free API key for repeated automation.

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.