Skip to main content
GET
/
v0
/
prices
List
curl --request GET \
  --url https://api.paygentic.io/v0/prices \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.paygentic.io/v0/prices"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.paygentic.io/v0/prices', 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://api.paygentic.io/v0/prices",
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://api.paygentic.io/v0/prices"

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://api.paygentic.io/v0/prices")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.paygentic.io/v0/prices")

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": "price_l5m6n7o8p9q0r1s2",
      "object": "price",
      "billableMetricId": "bm_t3u4v5w6x7y8z9a0",
      "createdAt": "2024-01-18T11:20:00Z",
      "currency": "USD",
      "description": "Per-token pricing for Claude API",
      "invoiceDisplayName": "Claude Token Consumption",
      "model": "standard",
      "paymentTerm": "instant",
      "properties": {
        "unitPrice": "0.00002"
      },
      "unitAmount": "20000000",
      "updatedAt": "2024-01-18T11:20:00Z"
    },
    {
      "id": "price_b1c2d3e4f5g6h7i8",
      "object": "price",
      "billableMetricId": "bm_j9k0l1m2n3o4p5q6",
      "createdAt": "2024-02-10T13:45:00Z",
      "currency": "USD",
      "description": "Tiered pricing for storage capacity",
      "invoiceDisplayName": "Storage Usage (GB)",
      "model": "volume",
      "paymentTerm": "in_arrears",
      "properties": {
        "maxPrice": "0.25",
        "minPrice": "0.05"
      },
      "unitAmount": "50000000000",
      "updatedAt": "2024-02-25T09:30:00Z"
    }
  ],
  "pagination": {
    "limit": 10,
    "offset": 0,
    "total": 2
  }
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}

Authorizations

Authorization
string
header
required

API key authentication

Query Parameters

billableMetricId
string

Filter prices by billable metric ID Unique identifier for a billable metric

Pattern: ^bm_[a-zA-Z0-9]+$
limit
integer
default:10

Number of prices to return

Required range: 1 <= x <= 100
offset
integer
default:0

Number of prices to skip

Required range: x >= 0

Response

List of prices

data
object[]
pagination
object