---
title: "Generate prompt JSON schema"
method: POST
path: "/ai/prompts/generateJsonSchema"
tags: ["AI - Prompts"]
---

# Generate prompt JSON schema

`POST /ai/prompts/generateJsonSchema`

Generate a JSON schema for the output of an AI prompt

## Request body

- object — Request body schema.
  - `prompt` string, required — Prompt to generate a JSON schema for.
  - `systemPrompt` string — Instructions given to the model alongside the prompt, used as extra context.

## Response `200`

Successful response

- object
  - `jsonSchema` object, required — Generated JSON schema.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/getcargo/apis/cargo-api.md) · [All operations](https://skmtc.net/getcargo/apis/cargo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getcargo/cargo-api/revisions/1d5a19e01d83/schema)
