Skip to main content
POST
/
v2
/
prompts
Create a prompt
curl --request POST \
  --url https://api.arize.com/v2/prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "space_id": "U3BhY2U6MTIzOmFiY2Q=",
  "name": "My Prompt",
  "description": "A helpful assistant prompt",
  "tags": [
    "customer-support"
  ],
  "commit_message": "Initial version",
  "input_variable_format": "f_string",
  "provider": "openAI",
  "model": "gpt-4",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello, {name}!"
    }
  ]
}
'
{
  "id": "prompt_001",
  "name": "My Prompt",
  "description": "A prompt for customer support",
  "space_id": "space_12345",
  "created_at": "2024-01-01T12:00:00Z",
  "updated_at": "2024-01-02T12:00:00Z",
  "created_by_user_id": "user_12345",
  "tags": [
    "customer-support",
    "help-desk"
  ]
}

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Body

application/json

Body containing prompt creation parameters

space_id
string
required

ID of the space to create the prompt in

name
string
required

Name of the prompt (must be unique within the space)

commit_message
string
required

Commit message describing this version

input_variable_format
enum<string>
required

The format for input variables in the prompt messages. There is no default; this field is required.

  • f_string: Single curly braces ({variable_name})
  • mustache: Double curly braces ({{variable_name}})
  • none: No input variable parsing
Available options:
f_string,
mustache,
none
provider
enum<string>
required

The LLM provider to use

Available options:
openAI,
azureOpenAI,
awsBedrock,
vertexAI,
custom
messages
object[]
required

The messages that make up the prompt template

Minimum array length: 1
description
string

Description of the prompt

tags
string[]

Tags to associate with the prompt

model
string

The model to use for the call

invocation_params
object

Parameters for the LLM invocation

provider_params
object

Provider-specific parameters

Response

A prompt object

A prompt is a reusable template for LLM interactions. Prompts can be versioned and labeled to track changes over time. Use prompts to standardize how you interact with LLMs across your application.

id
string
required

The prompt ID

name
string
required

The prompt name

space_id
string
required

The space ID the prompt belongs to

created_at
string<date-time>
required

When the prompt was created

updated_at
string<date-time>
required

When the prompt was last updated

created_by_user_id
string
required

The user ID of the user who created the prompt

description
string | null

The prompt description

tags
string[]

The tags associated with the prompt