---
title: "Import prompts"
method: POST
path: "/prompts/import"
tags: ["Prompts"]
---

# Import prompts

`POST /prompts/import`

## Request

- Base URL: `https://api.llmpulse.ai/api/v1`
- URL: `https://api.llmpulse.ai/api/v1/prompts/import`
- Auth: API key in header `Authorization`

The app's CSV import as JSON: up to 500 rows, each with its own prompt, country_code, language_code (codes or names; both default to the project's) and tags, created when missing. Duplicates are skipped and existing prompts still get the row's tags. The prompt limits are checked before anything is written: when the new prompts would exceed the plan the call returns ERR_LIMIT_REACHED and imports nothing. A row is skipped and comes back in row_errors when its country or language is unknown, when it would give a prompt more than 50 tags (rows repeating a prompt add up) or when its tags would take the request past 500 new tags. For a team member without create access to Tags, a row that needs a tag that does not exist yet is skipped and comes back in row_errors. For a team member without update access to Prompts, a row matching a prompt that already existed adds no tags to it, and comes back in row_errors when it would have added one. Responds 201 when it created prompts, 200 otherwise. The prompts of a launched pitch project are fixed, so importing one returns ERR_INVALID_PARAM with error.meta.reason pitch_prompts_frozen. `tracked` false, with `untracked_reason` and a `warning`, means the project does not run on the schedule, so the imported prompts do not run until that changes. Imported prompts get their first answers within about 24 hours. The first run is queued on creation and a nightly run at 00:00 Europe/Madrid picks up any prompt still without answers, as far as the account's allowance of AI answers for the cycle covers it. When the allowance left cannot give every new prompt one answer per enabled AI model, `first_runs_wait_until` gives the reset time when the rest run, with a `warning`. Requires a `read_write` scope API key and, for team members, create access to Prompts.

## Request body

- PromptsImportRequest
  - `project_id` integer, required
  - `rows` object[], required: One object per prompt (max 500)
    - `prompt` string, required
    - `country_code` string: ISO 3166-1 alpha-2 code or country name (default the project country)
    - `language_code` string: ISO language code or language name (default the project language)
    - `tags` string[]: Tag names for this prompt, created when missing

## Response `200`

Nothing new was created (every row was a duplicate)

- PromptsImportResponse
  - `project_id` integer, required
  - `processed_rows` integer, required: Distinct rows imported or matched to an existing prompt
  - `created` integer, required
  - `duplicates` integer, required: Rows that matched an existing prompt (they still get the row's tags, unless a team member lacks update access to Prompts)
  - `tagged` integer, required: New prompt-tag links
  - `created_tags` integer, required
  - `row_errors` object[], required: Rows that were skipped or whose tags were not added, by their index in rows
    - `row` integer, required
    - `error` string, required
  - `length_warning` string, nullable, required: Which tracked AI models will skip new prompts that are too long for them
  - `prompts_available` integer, nullable, required: Prompt slots left on the plan; null when unlimited
  - `tracked` boolean, required: Whether scheduled runs include the project the prompts were imported into. False when it is paused or beyond the plan's project limit, so the new prompts do not run until that changes
  - `untracked_reason` string, nullable, required: Why tracked is false: pitch_project, paused or project_limit. Null when tracked
  - `warning` string, nullable, required: What to do when tracked is false, or why some first runs wait when first_runs_wait_until is set. Null otherwise
  - `first_runs_wait_until` string, date-time, nullable, required: Set when the account's allowance of AI answers left this cycle cannot give every new prompt one answer per enabled AI model, so the rest run when the allowance resets at this time (00:00 Europe/Madrid). It counts this request's prompts against what was left when it arrived, not first runs other requests queued moments earlier. Null otherwise, when the allowance is unlimited, when tracked is false or when the account is not active
  - `request_id` string, required

## Other responses

- `201`: Prompts imported
- `403`: API key lacks write permission
- `404`: Resource not found
- `422`: Invalid parameters

## Changes

- **2026-10-16** `dd090b1e1154`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/llmpulse/apis/llm-pulse-api/changes/prompts/import/post.md)

---

[API](https://skmtc.dev/llmpulse/apis/llm-pulse-api.md) - [All operations](https://skmtc.dev/llmpulse/apis/llm-pulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/llmpulse/apis/llm-pulse-api/revisions/38a31f123641?raw)
