Inferences
Prompts API
The Prompts API allows you to manage AI prompts that can be used with inference endpoints. Prompts are reusable templates that can be applied to various AI models for consistent and structured responses.
List Prompts
Retrieves a list of prompts with optional filtering and pagination.
Query Parameters
category string (optional)
Filter prompts by category.
is_active boolean (optional)
Filter by active status.
is_user_specific boolean (optional)
Filter by user-specific prompts.
user_id string (optional)
Filter prompts by specific user.
search string (optional)
Search prompts by name, content, or category.
search_strategy string (optional)
Search strategy: match_all or match_some (default: match_some).
order_by string (optional)
Sort by field: created_at, updated_at, name, category (default: created_at).
direction string (optional)
Sort direction: asc or desc (default: desc).
page number (optional)
Page number for pagination (default: 1).
limit number (optional)
Number of items per page (default: 20, max: 100).
Example Request
Response
Get Prompts Dropdown
Retrieves a simplified list of active prompts for dropdown/selection purposes.
Example Request
Response
Create Prompt
Creates a new prompt. Maximum of 100 prompts allowed per organization.
Request Body
name string (required)
Name of the prompt (5-100 characters).
prompt string (required)
The prompt content (5-8000 characters).
category string (optional)
Category for organizing prompts (max 50 characters).
is_user_specific boolean (optional)
Whether the prompt is user-specific (default: false).
Example Request
Response
Retrieve Prompt
Retrieves a specific prompt by ID.
Path Parameters
prompt_id string (required)
The unique identifier of the prompt.
Example Request
Response
Update Prompt
Updates an existing prompt. Only the prompt owner or organization admin can update prompts.
Path Parameters
prompt_id string (required)
The unique identifier of the prompt.
Request Body
name string (optional)
Updated name of the prompt (5-100 characters).
prompt string (optional)
Updated prompt content (5-8000 characters).
category string (optional)
Updated category for organizing prompts (max 50 characters).
is_active boolean (optional)
Whether the prompt is active.
is_user_specific boolean (optional)
Whether the prompt is user-specific.
Example Request
Response
Delete Prompt
Deletes a specific prompt. Only the prompt owner or organization admin can delete prompts.
Path Parameters
prompt_id string (required)
The unique identifier of the prompt.
Example Request
Response
Using Prompts with Inferences
Prompts can be used with VLM (Vision Language Model) inferences by referencing the prompt_id in your inference requests: