Skip to main content
POST
/
v1
/
public
/
prompts
Create Prompt
curl --request POST \
  --url https://api.eigi.ai/v1/public/prompts \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "prompt_name": "customer_support_v1",
  "prompt_content": "You are a helpful customer support agent. Be polite and professional.",
  "prompt_metadata": {
    "prompt_type": "main"
  }
}
'
{
  "prompt_name": "<string>",
  "prompt_version": 123,
  "prompt_content": "<string>",
  "prompt_metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Overview

Create a new prompt for use with your AI agents. If a prompt with the same name already exists, a new version is automatically created with an incremented version number. Prompts support two types:
  • main — Used as the agent’s system prompt / instructions
  • analysis — Used for post-conversation analysis

Authentication

X-API-Key
string
required
Your eigi.ai API key. Must be prefixed with vk_.

Request Body

prompt_name
string
required
Unique prompt name (1-100 characters). If a prompt with this name exists, a new version is created.
prompt_content
string
required
The prompt text content — the instructions or system message for your agent.
prompt_metadata
object
Optional metadata for the prompt.

Response

prompt_name
string
The unique prompt name.
prompt_version
integer
Version number (starts at 1, auto-increments for existing prompts).
prompt_content
string
The prompt text content.
prompt_metadata
object
Metadata including prompt_type.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
ISO 8601 last update timestamp.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your API key from the eigi.ai Dashboard under Settings → API Keys.

Body

application/json
prompt_name
string
required

Unique prompt name (1-100 characters)

Required string length: 1 - 100
Example:

"customer_support_v1"

prompt_content
string
required

The prompt text content

Minimum string length: 1
Example:

"You are a helpful customer support agent for TechCorp. Be polite, professional, and solve customer issues efficiently."

prompt_metadata
object

Metadata for the prompt

Example:
{ "prompt_type": "main" }

Response

Prompt created successfully

prompt_name
string

Unique prompt name

prompt_version
integer

Version number of the prompt

prompt_content
string

The prompt text content

prompt_metadata
object

Additional metadata

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp