# Prompts

Read more about prompts from [Prompts documentation](https://prompteasy.eu/docs/features/prompts).

## Get a list of most recent prompts

`GET /v1/prompts`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 200: Most recent prompts

Content type: application/json

Type: array

Items:
  Reference: [PromptSnapshot](https://api.prompteasy.eu/docs/api/models/promptsnapshot/index.md); Type: object

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/prompts' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/prompts',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a new prompt

`POST /v1/prompts`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

Schema: [PromptRequest](https://api.prompteasy.eu/docs/api/models/promptrequest/index.md)

- `vault_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `llm_model` (optional)
  Type: string
  
  Example:
  
  ```json
  "gpt-4o"
  ```

- `llm_system_message` (optional)
  Type: string
  
  Example:
  
  ```json
  "You are a helpful assistant."
  ```

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Prompt"
  ```

- `prompt` (optional)
  Type: string
  
  Example:
  
  ```json
  "This is a prompt."
  ```

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Type: integer
    
    Example:
    
    ```json
    1
    ```

- `keywords` (optional)
  Type: string; nullable
  
  Example:
  
  ```json
  "blog, coffee, writing"
  ```

Responses:

- 201: Prompt object

Content type: application/json

Type: object

Schema: [Prompt](https://api.prompteasy.eu/docs/api/models/prompt/index.md)

- `id` (optional)
  Type: string, uuid

- `tenant_id` (optional)
  Type: integer

- `vault_id` (optional)
  Type: integer

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- `vault` (optional)
  Reference: [Vault](https://api.prompteasy.eu/docs/api/models/vault/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/prompts' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "vault_id": 1,
  "llm_model": "gpt-4o",
  "llm_system_message": "You are a helpful assistant.",
  "llm_settings": {
    "temp": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "max_tokens": 2048,
    "stop_sequences": [
      "stop"
    ]
  },
  "title": "My Prompt",
  "prompt": "This is a prompt.",
  "parameters": {
    "param1": "value1"
  },
  "categories": [
    1
  ],
  "keywords": "blog, coffee, writing"
}'
```

### JavaScript

```javascript
const body = `{
  "vault_id": 1,
  "llm_model": "gpt-4o",
  "llm_system_message": "You are a helpful assistant.",
  "llm_settings": {
    "temp": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "max_tokens": 2048,
    "stop_sequences": [
      "stop"
    ]
  },
  "title": "My Prompt",
  "prompt": "This is a prompt.",
  "parameters": {
    "param1": "value1"
  },
  "categories": [
    1
  ],
  "keywords": "blog, coffee, writing"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/prompts', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "vault_id": 1,
  "llm_model": "gpt-4o",
  "llm_system_message": "You are a helpful assistant.",
  "llm_settings": {
    "temp": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "max_tokens": 2048,
    "stop_sequences": [
      "stop"
    ]
  },
  "title": "My Prompt",
  "prompt": "This is a prompt.",
  "parameters": {
    "param1": "value1"
  },
  "categories": [
    1
  ],
  "keywords": "blog, coffee, writing"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/prompts',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Search for prompts (alternative GET method)

`GET /v1/prompts/search`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `search` (query, string, optional)
  Type: string

- `vault_id` (query, integer, optional)
  Type: integer

- `category_id` (query, integer, optional)
  Type: integer

Responses:

- 200: A paginated list of prompts

Content type: application/json

Type: object

Schema: [PaginatedPrompts](https://api.prompteasy.eu/docs/api/models/paginatedprompts/index.md)

- `current_page` (optional)
  Type: integer

- `data` (optional)
  Type: array
  
  Items:
    Reference: [PromptSnapshot](https://api.prompteasy.eu/docs/api/models/promptsnapshot/index.md); Type: object

- `first_page_url` (optional)
  Type: string, uri

- `from` (optional)
  Type: integer

- `last_page` (optional)
  Type: integer

- `last_page_url` (optional)
  Type: string, uri

- `links` (optional)
  Type: array
  
  Items:
    Reference: [PaginationLink](https://api.prompteasy.eu/docs/api/models/paginationlink/index.md); Type: object

- `next_page_url` (optional)
  Type: string, uri; nullable

- `path` (optional)
  Type: string, uri

- `per_page` (optional)
  Type: integer

- `prev_page_url` (optional)
  Type: string, uri; nullable

- `to` (optional)
  Type: integer

- `total` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/prompts/search' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/search', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/prompts/search',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Search for prompts

`POST /v1/prompts/search`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

Schema: [SearchRequest](https://api.prompteasy.eu/docs/api/models/searchrequest/index.md)

- `search` (optional)
  Type: string
  
  Example:
  
  ```json
  "search terms"
  ```

- `vault_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `category_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

Responses:

- 200: A paginated list of prompts

Content type: application/json

Type: object

Schema: [PaginatedPrompts](https://api.prompteasy.eu/docs/api/models/paginatedprompts/index.md)

- `current_page` (optional)
  Type: integer

- `data` (optional)
  Type: array
  
  Items:
    Reference: [PromptSnapshot](https://api.prompteasy.eu/docs/api/models/promptsnapshot/index.md); Type: object

- `first_page_url` (optional)
  Type: string, uri

- `from` (optional)
  Type: integer

- `last_page` (optional)
  Type: integer

- `last_page_url` (optional)
  Type: string, uri

- `links` (optional)
  Type: array
  
  Items:
    Reference: [PaginationLink](https://api.prompteasy.eu/docs/api/models/paginationlink/index.md); Type: object

- `next_page_url` (optional)
  Type: string, uri; nullable

- `path` (optional)
  Type: string, uri

- `per_page` (optional)
  Type: integer

- `prev_page_url` (optional)
  Type: string, uri; nullable

- `to` (optional)
  Type: integer

- `total` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/prompts/search' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "search": "search terms",
  "vault_id": 1,
  "category_id": 1
}'
```

### JavaScript

```javascript
const body = `{
  "search": "search terms",
  "vault_id": 1,
  "category_id": 1
}`;

const response = await fetch('https://api.prompteasy.eu/v1/prompts/search', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "search": "search terms",
  "vault_id": 1,
  "category_id": 1
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/prompts/search',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Detach a prompt

`POST /v1/prompts/{prompt}/detach`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 204: No Content

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/detach' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/detach', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/detach',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Attach a prompt

`POST /v1/prompts/{prompt}/attach`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

Request body: application/json (required)

Type: object

Schema: [AttachPromptRequest](https://api.prompteasy.eu/docs/api/models/attachpromptrequest/index.md)

- `vault_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

Responses:

- 204: No Content

- 401: Unauthorized

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/attach' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "vault_id": 1
}'
```

### JavaScript

```javascript
const body = `{
  "vault_id": 1
}`;

const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/attach', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "vault_id": 1
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/attach',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get a single prompt

`GET /v1/prompts/{prompt}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

- `for_edit` (query, boolean, optional) - If true, disables transparency template injection and skips generating an executed receipt.
  Type: boolean
  
  default: false

- `X-PE-Team-ID` (header, integer, optional) - Optional team ID override for CFO board execution telemetry.
  Type: integer

- `X-PE-Expected-LLM-Model` (header, string, optional) - Optional expected LLM model override for CFO board execution telemetry.
  Type: string

Responses:

- 200: Prompt object with `X-PE-Execution-ID` header for CFO board execution telemetry.

Content type: application/json

Type: object

Schema: [Prompt](https://api.prompteasy.eu/docs/api/models/prompt/index.md)

- `id` (optional)
  Type: string, uuid

- `tenant_id` (optional)
  Type: integer

- `vault_id` (optional)
  Type: integer

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- `vault` (optional)
  Reference: [Vault](https://api.prompteasy.eu/docs/api/models/vault/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000?for_edit=false' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000?for_edit=false', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000?for_edit=false',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Delete a prompt

`DELETE /v1/prompts/{prompt}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 204: No Content

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X DELETE 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get a specific version of a prompt (current or history)

`GET /v1/prompts/{prompt}/{version}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

- `version` (path, integer, required) - The version number of the prompt
  Type: integer

- `X-PE-Team-ID` (header, integer, optional) - Optional team ID override for CFO board execution telemetry.
  Type: integer

- `X-PE-Expected-LLM-Model` (header, string, optional) - Optional expected LLM model override for CFO board execution telemetry.
  Type: string

Responses:

- 200: Prompt object with `X-PE-Execution-ID` header for CFO board execution telemetry.

Content type: application/json

Type: object

Schema: [Prompt](https://api.prompteasy.eu/docs/api/models/prompt/index.md)

- `id` (optional)
  Type: string, uuid

- `tenant_id` (optional)
  Type: integer

- `vault_id` (optional)
  Type: integer

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- `vault` (optional)
  Reference: [Vault](https://api.prompteasy.eu/docs/api/models/vault/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

- 404: Prompt or version not found

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/0' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/0', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/0',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get prompt suggestions

`GET /v1/prompts/{prompt}/suggestions`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: A list of prompt suggestions

Content type: application/json

Type: array

Items:
  Reference: [PromptSuggestion](https://api.prompteasy.eu/docs/api/models/promptsuggestion/index.md); Type: object

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/suggestions' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/suggestions', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/suggestions',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get prompt history

`GET /v1/prompts/{prompt}/history`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: A list of prompt history

Content type: application/json

Type: array

Items:
  Reference: [PromptHistory](https://api.prompteasy.eu/docs/api/models/prompthistory/index.md); Type: object

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/history' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/history', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/prompts/550e8400-e29b-41d4-a716-446655440000/history',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a new prompt suggestion

`POST /v1/suggestions`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

Schema: [PromptSuggestionRequest](https://api.prompteasy.eu/docs/api/models/promptsuggestionrequest/index.md)

- `prompt_id` (optional)
  Type: string, uuid
  
  Example:
  
  ```json
  "uuid"
  ```

- `llm_model` (optional)
  Type: string
  
  Example:
  
  ```json
  "gpt-4o"
  ```

- `llm_system_message` (optional)
  Type: string
  
  Example:
  
  ```json
  "You are a helpful assistant."
  ```

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Prompt"
  ```

- `prompt` (optional)
  Type: string
  
  Example:
  
  ```json
  "This is a prompt."
  ```

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `pivot` (optional)
  Reference: [PromptSuggestionPivot](https://api.prompteasy.eu/docs/api/models/promptsuggestionpivot/index.md); Type: object

- `keywords` (optional)
  Type: string; nullable
  
  Example:
  
  ```json
  "blog, coffee, writing"
  ```

Responses:

- 201: Prompt suggestion object

Content type: application/json

Type: object

Schema: [PromptSuggestion](https://api.prompteasy.eu/docs/api/models/promptsuggestion/index.md)

- `id` (optional)
  Type: string, uuid

- `prompt_id` (optional)
  Type: string, uuid

- `rejected` (optional)
  Type: boolean

- `pivot` (optional)
  Reference: [PromptSuggestionPivot](https://api.prompteasy.eu/docs/api/models/promptsuggestionpivot/index.md); Type: object

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- 401: Unauthorized

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/suggestions' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "prompt_id": "uuid",
  "llm_model": "gpt-4o",
  "llm_system_message": "You are a helpful assistant.",
  "llm_settings": {
    "temp": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "max_tokens": 2048,
    "stop_sequences": [
      "stop"
    ]
  },
  "title": "My Prompt",
  "prompt": "This is a prompt.",
  "parameters": {
    "param1": "value1"
  },
  "pivot": {
    "categories": [
      1
    ]
  },
  "keywords": "blog, coffee, writing"
}'
```

### JavaScript

```javascript
const body = `{
  "prompt_id": "uuid",
  "llm_model": "gpt-4o",
  "llm_system_message": "You are a helpful assistant.",
  "llm_settings": {
    "temp": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "max_tokens": 2048,
    "stop_sequences": [
      "stop"
    ]
  },
  "title": "My Prompt",
  "prompt": "This is a prompt.",
  "parameters": {
    "param1": "value1"
  },
  "pivot": {
    "categories": [
      1
    ]
  },
  "keywords": "blog, coffee, writing"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/suggestions', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "prompt_id": "uuid",
  "llm_model": "gpt-4o",
  "llm_system_message": "You are a helpful assistant.",
  "llm_settings": {
    "temp": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "max_tokens": 2048,
    "stop_sequences": [
      "stop"
    ]
  },
  "title": "My Prompt",
  "prompt": "This is a prompt.",
  "parameters": {
    "param1": "value1"
  },
  "pivot": {
    "categories": [
      1
    ]
  },
  "keywords": "blog, coffee, writing"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/suggestions',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get a single prompt suggestion

`GET /v1/suggestions/{suggestion}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `suggestion` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: Prompt suggestion object

Content type: application/json

Type: object

Schema: [PromptSuggestion](https://api.prompteasy.eu/docs/api/models/promptsuggestion/index.md)

- `id` (optional)
  Type: string, uuid

- `prompt_id` (optional)
  Type: string, uuid

- `rejected` (optional)
  Type: boolean

- `pivot` (optional)
  Reference: [PromptSuggestionPivot](https://api.prompteasy.eu/docs/api/models/promptsuggestionpivot/index.md); Type: object

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Reject a prompt suggestion

`PUT /v1/suggestions/{suggestion}/reject`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `suggestion` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 204: No Content

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X PUT 'https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000/reject' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000/reject', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.put(
    'https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000/reject',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Approve a prompt suggestion

`PUT /v1/suggestions/{suggestion}/approve`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `suggestion` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: Prompt object

Content type: application/json

Type: object

Schema: [Prompt](https://api.prompteasy.eu/docs/api/models/prompt/index.md)

- `id` (optional)
  Type: string, uuid

- `tenant_id` (optional)
  Type: integer

- `vault_id` (optional)
  Type: integer

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- `vault` (optional)
  Reference: [Vault](https://api.prompteasy.eu/docs/api/models/vault/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X PUT 'https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000/approve' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000/approve', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.put(
    'https://api.prompteasy.eu/v1/suggestions/550e8400-e29b-41d4-a716-446655440000/approve',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get a single prompt history

`GET /v1/history/{history}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `history` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: Prompt history object

Content type: application/json

Type: object

Schema: [PromptHistory](https://api.prompteasy.eu/docs/api/models/prompthistory/index.md)

- `id` (optional)
  Type: string, uuid

- `prompt_id` (optional)
  Type: string, uuid

- `pivot` (optional)
  Type: object

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/history/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/history/550e8400-e29b-41d4-a716-446655440000', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/history/550e8400-e29b-41d4-a716-446655440000',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Restore a prompt history

`PUT /v1/history/{history}/restore`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `history` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: Prompt object

Content type: application/json

Type: object

Schema: [Prompt](https://api.prompteasy.eu/docs/api/models/prompt/index.md)

- `id` (optional)
  Type: string, uuid

- `tenant_id` (optional)
  Type: integer

- `vault_id` (optional)
  Type: integer

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- `vault` (optional)
  Reference: [Vault](https://api.prompteasy.eu/docs/api/models/vault/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X PUT 'https://api.prompteasy.eu/v1/history/550e8400-e29b-41d4-a716-446655440000/restore' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/history/550e8400-e29b-41d4-a716-446655440000/restore', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.put(
    'https://api.prompteasy.eu/v1/history/550e8400-e29b-41d4-a716-446655440000/restore',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get a list of detached prompts

`GET /v1/detached-prompts`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 200: A paginated list of detached prompts

Content type: application/json

Type: object

Schema: [PaginatedPrompts](https://api.prompteasy.eu/docs/api/models/paginatedprompts/index.md)

- `current_page` (optional)
  Type: integer

- `data` (optional)
  Type: array
  
  Items:
    Reference: [PromptSnapshot](https://api.prompteasy.eu/docs/api/models/promptsnapshot/index.md); Type: object

- `first_page_url` (optional)
  Type: string, uri

- `from` (optional)
  Type: integer

- `last_page` (optional)
  Type: integer

- `last_page_url` (optional)
  Type: string, uri

- `links` (optional)
  Type: array
  
  Items:
    Reference: [PaginationLink](https://api.prompteasy.eu/docs/api/models/paginationlink/index.md); Type: object

- `next_page_url` (optional)
  Type: string, uri; nullable

- `path` (optional)
  Type: string, uri

- `per_page` (optional)
  Type: integer

- `prev_page_url` (optional)
  Type: string, uri; nullable

- `to` (optional)
  Type: integer

- `total` (optional)
  Type: integer

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/detached-prompts' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/detached-prompts', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/detached-prompts',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Get a single detached prompt

`GET /v1/detached-prompts/{prompt}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `prompt` (path, string, uuid, required)
  Type: string, uuid

Responses:

- 200: Prompt object

Content type: application/json

Type: object

Schema: [Prompt](https://api.prompteasy.eu/docs/api/models/prompt/index.md)

- `id` (optional)
  Type: string, uuid

- `tenant_id` (optional)
  Type: integer

- `vault_id` (optional)
  Type: integer

- `llm_model` (optional)
  Type: string

- `llm_system_message` (optional)
  Type: string

- `llm_settings` (optional)
  Reference: [LlmSettings](https://api.prompteasy.eu/docs/api/models/llmsettings/index.md); Type: object

- `title` (optional)
  Type: string

- `prompt` (optional)
  Type: string

- `parameters` (optional)
  Reference: [PromptParameters](https://api.prompteasy.eu/docs/api/models/promptparameters/index.md); Type: object

- `keywords` (optional)
  Type: string

- `prompt_version` (optional)
  Type: integer

- `created_at` (optional)
  Type: string, date-time

- `updated_at` (optional)
  Type: string, date-time

- `vault` (optional)
  Reference: [Vault](https://api.prompteasy.eu/docs/api/models/vault/index.md); Type: object

- `categories` (optional)
  Type: array
  
  Items:
    Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- `is_in_vault_receipts` (optional)
  Type: boolean

- `days_until_safe_deletion` (optional)
  Type: integer

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/detached-prompts/550e8400-e29b-41d4-a716-446655440000' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/detached-prompts/550e8400-e29b-41d4-a716-446655440000', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/detached-prompts/550e8400-e29b-41d4-a716-446655440000',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Consult AI for prompt improvement

`POST /v1/ai/consult`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

Schema: [AiConsultRequest](https://api.prompteasy.eu/docs/api/models/aiconsultrequest/index.md)

- `categories` (optional)
  Type: array
  
  Items:
    Type: string
    
    Example:
    
    ```json
    "coding"
    ```

- `title` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Prompt"
  ```

- `prompt` (optional)
  Type: string
  
  Example:
  
  ```json
  "Write a blog post about coffee"
  ```

Responses:

- 200: AI consult response

Content type: application/json

Type: object

Schema: [AiConsultResponse](https://api.prompteasy.eu/docs/api/models/aiconsultresponse/index.md)

- `keywords` (optional)
  Type: string
  
  Example:
  
  ```json
  "blog, coffee, writing"
  ```

- `prompt` (optional)
  Type: string
  
  Example:
  
  ```json
  "Write a blog post about [[Topic]]"
  ```

- 401: Unauthorized

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/ai/consult' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "categories": [
    "coding"
  ],
  "title": "My Prompt",
  "prompt": "Write a blog post about coffee"
}'
```

### JavaScript

```javascript
const body = `{
  "categories": [
    "coding"
  ],
  "title": "My Prompt",
  "prompt": "Write a blog post about coffee"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/ai/consult', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "categories": [
    "coding"
  ],
  "title": "My Prompt",
  "prompt": "Write a blog post about coffee"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/ai/consult',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Check for prompts that need migration

`GET /v1/migrations`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 200: Number of prompts that need migration

Content type: application/json

Type: object

Schema: [MigrationStatusResponse](https://api.prompteasy.eu/docs/api/models/migrationstatusresponse/index.md)

- `prompts` (optional)
  Type: integer
  
  Example:
  
  ```json
  5
  ```

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/migrations' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/migrations', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/migrations',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Migrate prompts to default vault

`POST /v1/migrations`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 204: No Content

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/migrations' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/migrations', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'https://api.prompteasy.eu/v1/migrations',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Export prompts to CSV

`POST /v1/export`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json

Type: object

Schema: [ExportRequest](https://api.prompteasy.eu/docs/api/models/exportrequest/index.md)

- `vault_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `category_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

Responses:

- 200: CSV file download

Content type: text/csv

Type: string, binary

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/export' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "vault_id": 1,
  "category_id": 1
}'
```

### JavaScript

```javascript
const body = `{
  "vault_id": 1,
  "category_id": 1
}`;

const response = await fetch('https://api.prompteasy.eu/v1/export', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "vault_id": 1,
  "category_id": 1
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/export',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get a list of categories

`GET /v1/categories`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Responses:

- 200: A list of categories

Content type: application/json

Type: array

Items:
  Reference: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md); Type: object

- 401: Unauthorized

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/categories' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/categories', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/categories',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Create a new category

`POST /v1/categories`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

Schema: [CategoryRequest](https://api.prompteasy.eu/docs/api/models/categoryrequest/index.md)

- `name` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Category"
  ```

- `slug` (optional)
  Type: string
  
  Example:
  
  ```json
  "my-category"
  ```

- `description` (optional)
  Type: string
  
  Example:
  
  ```json
  "A category for my prompts"
  ```

Responses:

- 201: Category object

Content type: application/json

Type: object

Schema: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md)

- `id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `tenant_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `slug` (optional)
  Type: string
  
  Example:
  
  ```json
  "my-category"
  ```

- `name` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Category"
  ```

- `description` (optional)
  Type: string
  
  Example:
  
  ```json
  "A category for my prompts"
  ```

- `created_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2025-11-25T13:12:29+00:00"
  ```

- `updated_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2025-11-25T13:12:29+00:00"
  ```

- 401: Unauthorized

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/categories' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "My Category",
  "slug": "my-category",
  "description": "A category for my prompts"
}'
```

### JavaScript

```javascript
const body = `{
  "name": "My Category",
  "slug": "my-category",
  "description": "A category for my prompts"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/categories', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "name": "My Category",
  "slug": "my-category",
  "description": "A category for my prompts"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/categories',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Get a single category

`GET /v1/categories/{category}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `category` (path, integer, required)
  Type: integer

Responses:

- 200: Category object

Content type: application/json

Type: object

Schema: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md)

- `id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `tenant_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `slug` (optional)
  Type: string
  
  Example:
  
  ```json
  "my-category"
  ```

- `name` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Category"
  ```

- `description` (optional)
  Type: string
  
  Example:
  
  ```json
  "A category for my prompts"
  ```

- `created_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2025-11-25T13:12:29+00:00"
  ```

- `updated_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2025-11-25T13:12:29+00:00"
  ```

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X GET 'https://api.prompteasy.eu/v1/categories/0' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/categories/0', {
  method: 'GET',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'https://api.prompteasy.eu/v1/categories/0',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Update a category

`PUT /v1/categories/{category}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `category` (path, integer, required)
  Type: integer

Request body: application/json (required)

Type: object

Schema: [CategoryRequest](https://api.prompteasy.eu/docs/api/models/categoryrequest/index.md)

- `name` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Category"
  ```

- `slug` (optional)
  Type: string
  
  Example:
  
  ```json
  "my-category"
  ```

- `description` (optional)
  Type: string
  
  Example:
  
  ```json
  "A category for my prompts"
  ```

Responses:

- 200: Category object

Content type: application/json

Type: object

Schema: [Category](https://api.prompteasy.eu/docs/api/models/category/index.md)

- `id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `tenant_id` (optional)
  Type: integer
  
  Example:
  
  ```json
  1
  ```

- `slug` (optional)
  Type: string
  
  Example:
  
  ```json
  "my-category"
  ```

- `name` (optional)
  Type: string
  
  Example:
  
  ```json
  "My Category"
  ```

- `description` (optional)
  Type: string
  
  Example:
  
  ```json
  "A category for my prompts"
  ```

- `created_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2025-11-25T13:12:29+00:00"
  ```

- `updated_at` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2025-11-25T13:12:29+00:00"
  ```

- 401: Unauthorized

- 403: Forbidden

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X PUT 'https://api.prompteasy.eu/v1/categories/0' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "My Category",
  "slug": "my-category",
  "description": "A category for my prompts"
}'
```

### JavaScript

```javascript
const body = `{
  "name": "My Category",
  "slug": "my-category",
  "description": "A category for my prompts"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/categories/0', {
  method: 'PUT',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "name": "My Category",
  "slug": "my-category",
  "description": "A category for my prompts"
}'''

response = requests.put(
    'https://api.prompteasy.eu/v1/categories/0',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```


## Delete a category

`DELETE /v1/categories/{category}`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Parameters:

- `category` (path, integer, required)
  Type: integer

Responses:

- 204: No Content

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X DELETE 'https://api.prompteasy.eu/v1/categories/0' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.prompteasy.eu/v1/categories/0', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.delete(
    'https://api.prompteasy.eu/v1/categories/0',
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```


## Generate a slug from a string

`POST /v1/slugify`

Authentication (security requirement alternatives):

```json
[
  {
    "ApiKeyAuth": [],
    "BearerAuth": []
  }
]
```

- ApiKeyAuth: apiKey, header X-Api-Key
- BearerAuth: http (bearer)

Request body: application/json (required)

Type: object

Schema: [SlugifyRequest](https://api.prompteasy.eu/docs/api/models/slugifyrequest/index.md)

- `text` (optional)
  Type: string
  
  Example:
  
  ```json
  "Some Text"
  ```

Responses:

- 200: Slug object

Content type: application/json

Type: object

Schema: [Slug](https://api.prompteasy.eu/docs/api/models/slug/index.md)

- `slug` (optional)
  Type: string
  
  Example:
  
  ```json
  "some-text"
  ```

- 422: Unprocessable Entity

Content type: application/json

Type: object

Schema: [ValidationError](https://api.prompteasy.eu/docs/api/models/validationerror/index.md)

- `message` (optional)
  Type: string
  
  Example:
  
  ```json
  "Validation failed"
  ```

- `errors` (optional)
  Reference: [ValidationErrorErrors](https://api.prompteasy.eu/docs/api/models/validationerrorerrors/index.md); Type: object

## Examples

### cURL

```bash
curl -X POST 'https://api.prompteasy.eu/v1/slugify' \
  -H 'X-Api-Key: YOUR_TOKEN' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "text": "Some Text"
}'
```

### JavaScript

```javascript
const body = `{
  "text": "Some Text"
}`;

const response = await fetch('https://api.prompteasy.eu/v1/slugify', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_TOKEN',
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "text": "Some Text"
}'''

response = requests.post(
    'https://api.prompteasy.eu/v1/slugify',
    data=body.encode('utf-8'),
    headers={
        'X-Api-Key': 'YOUR_TOKEN',
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
