---
title: "Improve Prompt"
method: POST
path: "/v1/generate/improve-prompt"
tags: ["generate"]
---

# Improve Prompt

`POST /v1/generate/improve-prompt`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/generate/improve-prompt`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/generate/improve-prompt/post.ts> (a function with typed inputs; its response is checked against the schema)

Improve a dataset generation prompt with AI-generated expansions.

## Request body

- ImprovePromptRequest: Request to improve a dataset generation prompt.
  - `prompt` string, required: The user's original prompt to improve
  - `data_type` string, nullable: The dataset type (classification, entity_extraction, json_extraction)

## Response `200`

Successful Response

- ImprovePromptResponse: Response containing the improved prompt.
  - `success` boolean, required
  - `improved_prompt` string, required
  - `summary` string, required: Short summary of what was improved

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/generate/improve-prompt/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
