---
title: "Convert Prompt File To Json"
method: POST
path: "/utils/dotprompt_json_converter"
tags: ["prompts"]
---

# Convert Prompt File To Json

`POST /utils/dotprompt_json_converter`

Convert a .prompt file to JSON format.

This endpoint accepts a .prompt file upload and returns the equivalent JSON representation
that can be stored in a database or used programmatically.

Returns the JSON structure with 'content' and 'metadata' fields.

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-19** `c357baf422ab` — 1 info
  - api tag `utils` removed
- **2026-09-18** `082b5fabd909` — 1 breaking, 4 info
  - the `file` request property contentMediaType changed from `` to `application/octet-stream`
  - api tag `utils` added
  - the `file` request property format was generalized from `binary` to no format
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - …1 more
- **2026-09-17** `e2f308355e2d` — 1 info
  - api tag `utils` removed
- **2026-09-12** `0915d6a9ba99` — 1 info
  - api tag `utils` added
- **2026-09-11** `f9848f60f12d` — 1 info
  - api tag `utils` removed

[Full history](https://skmtc.dev/flock/apis/litellm-api/changes/utils/dotprompt_json_converter/post.md)

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flock/apis/litellm-api/revisions/3b2b241e4b0b?raw)
