---
title: "Create Prompt"
method: POST
path: "/prompts"
tags: ["Prompt Management"]
---

# Create Prompt

`POST /prompts`

Create a new prompt

👉 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)

Example Request:
```bash
curl -X POST "http://localhost:4000/prompts" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "prompt_id": "my_prompt",
        "litellm_params": {
            "prompt_id": "json_prompt",
            "prompt_integration": "dotprompt",
            ### EITHER prompt_directory OR prompt_data MUST BE PROVIDED
            "prompt_directory": "/path/to/dotprompt/folder",
            "prompt_data": {"json_prompt": {"content": "This is a prompt", "metadata": {"model": "gpt-4"}}}
        },
        "prompt_info": {
            "prompt_type": "config"
        }
    }'
```

## Request body

- Prompt
  - `prompt_id` string, required
  - `litellm_params` PromptLiteLLMParams, required
    - `prompt_id` string, nullable
    - `prompt_integration` string, required
    - `api_base` string, nullable
    - `api_key` string, nullable
    - `provider_specific_query_params` object, nullable
    - `ignore_prompt_manager_model` boolean, nullable
    - `ignore_prompt_manager_optional_params` boolean, nullable
    - `dotprompt_content` string, nullable
  - `prompt_info` PromptInfo
    - `prompt_type` 'config' | 'db', required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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