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",
"prompt_id": "<string>",
"conversion_id": "<string>",
"encryption": {
"format": "jwe",
"alg": "RSA-OAEP-256",
"enc": "A256GCM",
"key_id": "<string>"
},
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"usage": {
"pricing_version": "local-v5-monthly-fees",
"platform": {
"tool_cpu_seconds": "1.000000",
"tool_cpu_rate_usd_per_second": "0.001000000"
},
"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.061000000",
"itemized": {
"base_fee_usd": "0.050000000",
"cpu_fee_usd": "0.001000000",
"inference_fee_usd": "0.010000000"
}
}
},
"metadata": {
"customer": "acme",
"environment": "production"
},
"inference": {
"provider": "openai",
"model": "<string>",
"billing": "revise"
},
"limits": {
"max_platform_cost_usd": "0.050000000",
"max_inference_cost_usd": "0.050000000",
"max_seconds": 123
},
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"api_key_id": "<string>",
"output_encrypted": true,
"comments": [
{
"root": {},
"replies": [
{}
],
"anchor": {},
"relatedSuggestionIds": [
"<string>"
]
}
],
"changes": [
{
"id": "<string>",
"kind": "<string>",
"blockIds": [
"<string>"
],
"commentThreadId": "<string>"
}
],
"content_expires_at": "2023-11-07T05:31:56Z",
"content_deleted_at": "2023-11-07T05:31:56Z",
"retention": {
"delete_after_webhook_id": "<string>"
},
"incomplete": true,
"stop_reason": "spending_limit"
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}List prompts
Returns the same Prompt objects as GET /v1/prompt/. Pass next_cursor as cursor for the next page; null means the end. Ordering is created_at descending, then ID descending. Cursors belong to the authenticated account. Newly submitted requests do not shift subsequent pages. Invalid limits or cursors return 400. Filters combine with AND. Repeat the same filters on each page. Status reflects current state, so this is not a frozen snapshot of mutable fields. Unknown and duplicate 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",
"prompt_id": "<string>",
"conversion_id": "<string>",
"encryption": {
"format": "jwe",
"alg": "RSA-OAEP-256",
"enc": "A256GCM",
"key_id": "<string>"
},
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"usage": {
"pricing_version": "local-v5-monthly-fees",
"platform": {
"tool_cpu_seconds": "1.000000",
"tool_cpu_rate_usd_per_second": "0.001000000"
},
"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.061000000",
"itemized": {
"base_fee_usd": "0.050000000",
"cpu_fee_usd": "0.001000000",
"inference_fee_usd": "0.010000000"
}
}
},
"metadata": {
"customer": "acme",
"environment": "production"
},
"inference": {
"provider": "openai",
"model": "<string>",
"billing": "revise"
},
"limits": {
"max_platform_cost_usd": "0.050000000",
"max_inference_cost_usd": "0.050000000",
"max_seconds": 123
},
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"api_key_id": "<string>",
"output_encrypted": true,
"comments": [
{
"root": {},
"replies": [
{}
],
"anchor": {},
"relatedSuggestionIds": [
"<string>"
]
}
],
"changes": [
{
"id": "<string>",
"kind": "<string>",
"blockIds": [
"<string>"
],
"commentThreadId": "<string>"
}
],
"content_expires_at": "2023-11-07T05:31:56Z",
"content_deleted_at": "2023-11-07T05:31:56Z",
"retention": {
"delete_after_webhook_id": "<string>"
},
"incomplete": true,
"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