Skip to main content

Overview

The list() method allows you to retrieve prompts with optional filtering and pagination. This is useful for browsing, searching, and managing your prompt collection.

Usage example

Parameters

integer
default:1
Page number for pagination.
integer
default:50
Number of prompts per page (max 100).
string
Filter by prompt name (partial match).
object
Filter by metadata key-value pairs.
string
Field to sort by (name, created_at, updated_at).
string
Sort order (asc, desc).

Returns

Returns a PromptListResponse object containing the list of prompts and pagination information:

Examples

Basic Synchronous Example

With Pagination

With Filtering

Asynchronous Example

Asynchronous with Filtering

Convenience Functions

You can also use the convenience function to create a PromptAPI client: