Skip to main content
GET
/
v2
/
prompts
/
{prompt_id}
Get a prompt
curl --request GET \
  --url https://api.arize.com/v2/prompts/{prompt_id} \
  --header 'Authorization: Bearer <token>'
{
  "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",
  "version": {
    "id": "pv_001",
    "prompt_id": "prompt_001",
    "commit_hash": "abc123def456",
    "commit_message": "Initial version",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello, {name}!"
      }
    ],
    "input_variable_format": "f_string",
    "provider": "openAI",
    "model": "gpt-4",
    "invocation_params": {},
    "provider_params": {},
    "created_at": "2024-01-01T12:00:00Z",
    "created_by_user_id": "user_12345",
    "labels": []
  }
}

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

Path Parameters

prompt_id
string
required

The unique identifier of the prompt A universally unique identifier

Example:

"RW50aXR5OjEyMzQ1"

Query Parameters

version_id
string

Return the prompt with this specific version. Mutually exclusive with label. A universally unique identifier

Example:

"RW50aXR5OjEyMzQ1"

label
string

Return the prompt with the version pointed to by this label (e.g., "production"). Mutually exclusive with version_id.

Response

A prompt object with a resolved version

A prompt with a resolved version. Returned by Create Prompt and Get Prompt. The version is the initial version on create, or the resolved version (latest, by ID, or by label) on get.

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

version
object
required

A prompt version represents a specific snapshot of a prompt's configuration. Each version captures the messages, model settings, and parameters at a point in time. Versions are immutable once created and are identified by a commit hash.

description
string | null

The prompt description