Skip to main content
The prompts client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.
Manage prompt templates and their versions programmatically. Create versioned prompts, assign labels to specific versions, and retrieve prompts by label for use in production workflows.

Key Capabilities

  • Create and manage prompt templates within spaces
  • Version prompts with commit messages
  • Assign and resolve labels (e.g. "production", "staging") to specific versions
  • List prompts and versions with pagination support
  • Retrieve, update, and delete prompts

List Prompts

List all prompts you have access to, with optional filtering by space.
For details on pagination, field introspection, and data conversion (to dict/JSON/DataFrame), see Response Objects.

Create a Prompt

Create a new prompt with an initial version. Prompt names must be unique within the target space.

With Invocation Parameters

Set default inference parameters alongside the prompt template.

Get a Prompt

Retrieve a prompt by name or ID. By default the latest version is returned. When using a name, provide space to disambiguate.

Get a Specific Version

Get by Label

Resolve a named label (e.g. "production") to the version it currently points to.

Update a Prompt

Update a prompt’s metadata. Currently supports updating the description.

Delete a Prompt

Delete a prompt by name or ID. This operation is irreversible and removes all associated versions. There is no response from this call.

Manage Versions

List Versions

List all versions for a prompt in reverse-chronological order.

Get a Version

Retrieve a specific prompt version by its ID.

Create a New Version

Add a new version to an existing prompt. Each version is immutable after creation.

Manage Labels

Labels are mutable pointers to a specific version. Use them to decouple your application code from version IDs — update the label when you want to promote a new version without changing application code.

Get a Version by Label

Resolve a label name to the version it currently points to.

Set Labels on a Version

Assign one or more labels to a version. This replaces all existing labels on that version.

Promote a New Version

Delete a Label

Remove a label from a version. This does not delete the version itself.