List prompts
Returns Prompt receipts newest first, ordered by created_at then ID. Pass next_cursor with the same filters for the next page; null means the end. Cursors belong to the authenticated account. Filters combine with AND. Status is current, not a frozen snapshot. Metadata filters stop matching after content expiry or deletion. Unknown or repeated query parameters return 400.
curl --request GET \
--url https://revise.io/api/v1/prompts \
--header 'Authorization: Bearer <token>'import requests
url = "https://revise.io/api/v1/prompts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://revise.io/api/v1/prompts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://revise.io/api/v1/prompts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://revise.io/api/v1/prompts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://revise.io/api/v1/prompts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://revise.io/api/v1/prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"conversation_id": "<string>",
"previous_prompt_id": "<string>",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"conversation_expires_at": "2023-11-07T05:31:56Z",
"message": {
"role": "assistant",
"content": "<string>",
"incomplete": true,
"citations": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"startIndex": 123,
"endIndex": 123
}
]
},
"continuation": {
"reasoning_state": "new",
"history_compacted": true,
"reason": "<string>"
},
"artifacts": [
{
"id": "<string>",
"format": "docx",
"filename": "<string>",
"content_type": "<string>",
"variant": "tracked_changes",
"sha256": "<string>",
"bytes": 123,
"download_url": "<string>",
"input_eligible": true,
"expires_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"prompt_id": "<string>",
"conversion_id": "<string>",
"encryption": {
"format": "jwe",
"alg": "RSA-OAEP-256",
"enc": "A256GCM",
"key_id": "<string>"
}
}
],
"usage": {
"pricing_version": "local-v8-conversion-pages",
"platform": {
"tool_cpu_seconds": "1.000000",
"tool_cpu_rate_usd_per_second": "0.050000000"
},
"inference": {
"billed_by": "revise",
"input_tokens": 1200,
"cached_input_tokens": 400,
"cache_creation_input_tokens": 0,
"output_tokens": 200,
"web_search_requests": 1,
"web_search_unit": "calls"
},
"cost": {
"total_usd": "0.110000000",
"itemized": {
"base_fee_usd": "0.050000000",
"cpu_fee_usd": "0.050000000",
"inference_fee_usd": "0.010000000"
}
}
},
"metadata": {
"customer": "acme",
"environment": "production"
},
"inference": {
"provider": "openai",
"model": "<string>",
"billing": "revise"
},
"limits": {
"max_seconds": 123,
"max_platform_cost_usd": "0.050000000",
"max_inference_cost_usd": "0.050000000"
},
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"api_key_id": "<string>",
"output_encrypted": true,
"content_expires_at": "2023-11-07T05:31:56Z",
"content_deleted_at": "2023-11-07T05:31:56Z",
"incomplete": true,
"comments": [
{
"id": "<string>",
"author": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"bodyMd": "<string>",
"initials": "<string>",
"authorId": "<string>",
"authorImageUrl": "<string>",
"parentId": "<string>",
"agentRequestId": "<string>",
"agentConversationId": "<string>",
"agentName": "<string>",
"agentModel": "<string>",
"suggestionId": "<string>",
"anchorBlockId": "<string>",
"agentTriggerIds": [
"<string>"
],
"relatedSuggestionIds": [
"<string>"
],
"resolved": true,
"authorType": "human",
"importedId": 123,
"citations": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"startIndex": 123,
"endIndex": 123
}
],
"mentions": [
{
"id": "<string>",
"type": "user",
"label": "<string>",
"start": 123,
"end": 123,
"email": "<string>"
}
]
}
],
"changes": [
{
"id": "<string>",
"kind": "insert",
"blockIds": [
"<string>"
],
"author": "<string>",
"authorType": "human",
"commentThreadId": "<string>",
"agentModel": "<string>",
"description": "<string>",
"insertedText": "<string>",
"deletedText": "<string>",
"createdAt": 123,
"moveSourceBlockIds": [
"<string>"
],
"moveDestinationBlockIds": [
"<string>"
]
}
],
"retention": {
"delete_after_webhook_id": "<string>"
},
"stop_reason": "spending_limit"
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}TypeScript
import { ReviseClient } from "@reviseio/api";
const revise = new ReviseClient({ apiKey: process.env.REVISE_API_KEY! });
const result = await revise.prompts.list({ limit: 20, metadata: { customer: "acme" } });
Authorizations
Revise API key from https://revise.io/console/api-keys. Send Authorization: Bearer .
Query Parameters
1 <= x <= 100The next_cursor returned by the previous page.
queued, running, paused, succeeded, failed, cancelled Exact conv_ ID.
Exact key_ ID of the submitting key. Older unattributed prompts do not match.
Inclusive lower creation-time bound (RFC3339 with timezone).
Exclusive upper creation-time bound (RFC3339 with timezone).
Exact AND matches, e.g. metadata[customer]=Acme. Keys up to 64 bytes; values up to 512 bytes.
Show child attributes
Show child attributes
curl --request GET \
--url https://revise.io/api/v1/prompts \
--header 'Authorization: Bearer <token>'import requests
url = "https://revise.io/api/v1/prompts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://revise.io/api/v1/prompts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://revise.io/api/v1/prompts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://revise.io/api/v1/prompts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://revise.io/api/v1/prompts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://revise.io/api/v1/prompts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"conversation_id": "<string>",
"previous_prompt_id": "<string>",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"conversation_expires_at": "2023-11-07T05:31:56Z",
"message": {
"role": "assistant",
"content": "<string>",
"incomplete": true,
"citations": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"startIndex": 123,
"endIndex": 123
}
]
},
"continuation": {
"reasoning_state": "new",
"history_compacted": true,
"reason": "<string>"
},
"artifacts": [
{
"id": "<string>",
"format": "docx",
"filename": "<string>",
"content_type": "<string>",
"variant": "tracked_changes",
"sha256": "<string>",
"bytes": 123,
"download_url": "<string>",
"input_eligible": true,
"expires_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"prompt_id": "<string>",
"conversion_id": "<string>",
"encryption": {
"format": "jwe",
"alg": "RSA-OAEP-256",
"enc": "A256GCM",
"key_id": "<string>"
}
}
],
"usage": {
"pricing_version": "local-v8-conversion-pages",
"platform": {
"tool_cpu_seconds": "1.000000",
"tool_cpu_rate_usd_per_second": "0.050000000"
},
"inference": {
"billed_by": "revise",
"input_tokens": 1200,
"cached_input_tokens": 400,
"cache_creation_input_tokens": 0,
"output_tokens": 200,
"web_search_requests": 1,
"web_search_unit": "calls"
},
"cost": {
"total_usd": "0.110000000",
"itemized": {
"base_fee_usd": "0.050000000",
"cpu_fee_usd": "0.050000000",
"inference_fee_usd": "0.010000000"
}
}
},
"metadata": {
"customer": "acme",
"environment": "production"
},
"inference": {
"provider": "openai",
"model": "<string>",
"billing": "revise"
},
"limits": {
"max_seconds": 123,
"max_platform_cost_usd": "0.050000000",
"max_inference_cost_usd": "0.050000000"
},
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"api_key_id": "<string>",
"output_encrypted": true,
"content_expires_at": "2023-11-07T05:31:56Z",
"content_deleted_at": "2023-11-07T05:31:56Z",
"incomplete": true,
"comments": [
{
"id": "<string>",
"author": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"bodyMd": "<string>",
"initials": "<string>",
"authorId": "<string>",
"authorImageUrl": "<string>",
"parentId": "<string>",
"agentRequestId": "<string>",
"agentConversationId": "<string>",
"agentName": "<string>",
"agentModel": "<string>",
"suggestionId": "<string>",
"anchorBlockId": "<string>",
"agentTriggerIds": [
"<string>"
],
"relatedSuggestionIds": [
"<string>"
],
"resolved": true,
"authorType": "human",
"importedId": 123,
"citations": [
{
"id": "<string>",
"url": "<string>",
"title": "<string>",
"startIndex": 123,
"endIndex": 123
}
],
"mentions": [
{
"id": "<string>",
"type": "user",
"label": "<string>",
"start": 123,
"end": 123,
"email": "<string>"
}
]
}
],
"changes": [
{
"id": "<string>",
"kind": "insert",
"blockIds": [
"<string>"
],
"author": "<string>",
"authorType": "human",
"commentThreadId": "<string>",
"agentModel": "<string>",
"description": "<string>",
"insertedText": "<string>",
"deletedText": "<string>",
"createdAt": 123,
"moveSourceBlockIds": [
"<string>"
],
"moveDestinationBlockIds": [
"<string>"
]
}
],
"retention": {
"delete_after_webhook_id": "<string>"
},
"stop_reason": "spending_limit"
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}