---
title: "Create a response-format preset"
method: POST
path: "/api/response-format-presets/"
tags: ["prompts"]
---

# Create a response-format preset

`POST /api/response-format-presets/`

Save JSON-schema text in the caller's project. The content remains a JSON string and is validated without reformatting. Project and creator are server stamped.

## Headers

- `Authorization` string, required

## Request body

- object
  - `name` string, required
  - `response_format_content` string, required — JSON text preserved verbatim. It must decode to an object with a non-empty `name` and an object-valued `schema`.
  - `is_enforcing_response_format` boolean

## Response `201`

Preset created.

- PromptsApiResponseFormatPresetsCreateResponse201
  - `id` string, required
  - `name` string, required
  - `project` string, required — Server-stamped project UUID.
  - `created_by` integer, nullable, required — Server-stamped creator user ID.
  - `response_format_content` string, required — JSON text preserved verbatim. It must decode to an object with a non-empty `name` and an object-valued `schema`.
  - `is_enforcing_response_format` boolean, required

## Other responses

- `400` — Invalid preset content.
- `401` — Authentication failed.

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/4e064cf81dae/schema)
