List prompts

Lists the prompts owned by or shared with the authenticated user, with support for filtering, ordering and cursor-based pagination.

Examples

List the first prompts in your library, filtering by tag and sorting by most recently modified.

import requests

url = "https://www.virustotal.com/api/v3/agent/prompts"
headers = {"accept": "application/json", "x-apikey": <api-key>}
params = {"filter": "tag:malware", "order": "last_updated-", "limit": 10}

response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
page = response.json()

for prompt in page["data"]:
    print(prompt["id"], prompt["attributes"]["name"])

# Follow the cursor to fetch the next page, if any
cursor = page.get("meta", {}).get("cursor")
if cursor:
    next_page = requests.get(
        url,
        headers=headers,
        params={"cursor": cursor, "limit": 10},
    ).json()
Query Params
string

Filter expression using search-modifier syntax (e.g. tag:malware, owner:username, shared_with_me:true). Results are scoped to prompts owned by or shared with the authenticated user.

string

Sort spec: <field> or <field>+ ascending, <field>- descending (e.g. last_updated-). Sortable fields: last_updated, owner.

string

A token identifying a page of results, taken from the previous response's meta.cursor.

integer
1 to 40
Defaults to 40

Maximum number of prompts to return per page.

Headers
string
required

Your API key.

Responses

400

Invalid parameter value or malformed order syntax.

401

Missing or invalid API key.

403

User or group lacks permission to access Agentic API features.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json