Skip to main content

Models

Model catalog

Read-only catalog endpoints with credit prices, refreshed every 15 minutes.

gethttps://api.pre.dev/v1/modelsTry it

The catalog lists every model the gateway serves, with pre.dev credit prices added. Reads are free, not rate-limited, and do not need credits.

MethodPathReturns
GET/v1/modelsAll models, each row with a predev price object
GET/v1/models/countNumber of models in /v1/models
GET/v1/embeddings/modelsEmbedding models
GET/v1/images/modelsImage generation models
GET/v1/videos/modelsVideo generation models
GET/v1/models/publicEvery model with its lab and modalities and no prices; needs no key
curl --fail-with-body -i https://api.pre.dev/v1/models \
  -H "Authorization: Bearer $PREDEV_API_KEY"

The predev object

Each model row carries its prices in credits (see pricing):

FieldUnitPresent when
credits_per_m_inputCredits per million input tokensAlways; null when the model has no token price
credits_per_m_outputCredits per million output tokensAlways; null when the model has no token price
credits_per_m_cache_readCredits per million cached input tokens readThe model prices cache reads
credits_per_m_cache_writeCredits per million tokens written to cacheThe model prices cache writes
credits_per_imageCredits per imageThe model prices images
credits_per_requestCredits per requestThe model has a per-request price
credits_per_second_outputCredits per second of generated videoVideo models priced by the second
credits_per_m_video_tokensCredits per million video tokensVideo models priced by the token
credits_per_m_output_image_tokensCredits per million generated image tokensImage models priced by the token
billablesEach priced unit as { billable, unit, credits }Image models with itemized prices
{
  "id": "anthropic/claude-sonnet-5",
  "name": "Anthropic: Claude Sonnet 5",
  "context_length": 1000000,
  "predev": {
    "credits_per_m_input": 40,
    "credits_per_m_output": 200,
    "credits_per_m_cache_read": 4,
    "credits_per_m_cache_write": 50
  }
}

The numbers above are illustrative; read the live row for current prices. The other fields in the row (name, context_length, architecture with input and output modalities, supported_parameters, and so on) describe the model itself.

Freshness

x-predev-catalog-age on every catalog response is the number of seconds since the catalog last refreshed. The catalog refreshes every 15 minutes, so a newly released model can appear up to 15 minutes after it becomes available.

Paths outside this table return 404.

curl -X GET "https://api.pre.dev/v1/models"
fetch("https://api.pre.dev/v1/models", {  method: "GET"})
package mainimport (  "fmt"  "net/http"  "io/ioutil")func main() {  url := "https://api.pre.dev/v1/models"  req, _ := http.NewRequest("GET", url, nil)  res, _ := http.DefaultClient.Do(req)  defer res.Body.Close()  body, _ := ioutil.ReadAll(res.Body)  fmt.Println(res)  fmt.Println(string(body))}
import requestsurl = "https://api.pre.dev/v1/models"response = requests.request("GET", url)print(response.text)
import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.net.http.HttpResponse.BodyHandlers;import java.time.Duration;HttpClient client = HttpClient.newBuilder()  .connectTimeout(Duration.ofSeconds(10))  .build();HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()  .uri(URI.create("https://api.pre.dev/v1/models"))  .GET()  .build();try {  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());  System.out.println("Status code: " + response.statusCode());  System.out.println("Response body: " + response.body());} catch (Exception e) {  e.printStackTrace();}
using System;using System.Net.Http;using System.Text;var client = new HttpClient();var response = await client.GetAsync("https://api.pre.dev/v1/models");var responseBody = await response.Content.ReadAsStringAsync();
use reqwest::{Result, Client};async fn main() -> Result<()> {  let client = Client::new();  let url = "https://api.pre.dev/v1/models";  let res = client    .get(url)    .send()    .await?    .text()    .await?;  println!("{}", res);  Ok(())}
{  "data": [    {      "id": "anthropic/claude-sonnet-5",      "canonical_slug": "anthropic/claude-sonnet-5",      "name": "Anthropic: Claude Sonnet 5",      "created": 1782843083,      "context_length": 1000000,      "architecture": {        "modality": "text+image+file->text",        "input_modalities": [          "text",          "image",          "file"        ],        "output_modalities": [          "text"        ]      },      "supported_parameters": [        "max_tokens",        "reasoning",        "response_format",        "structured_outputs",        "tools",        "tool_choice"      ],      "predev": {        "credits_per_m_input": 40,        "credits_per_m_output": 200,        "credits_per_m_cache_read": 4,        "credits_per_m_cache_write": 50      }    }  ],  "total_count": 1}
GET
/v1/models

Authorization

AuthorizationBearer <token>

The workspace API key (pdk_…) from Integrations → Built-in in the pre.dev dashboard.

In: header

Response Body

application/json

The catalog.

TypeScript Definitions

Use the response body type in TypeScript.

application/json

application/json

application/json

application/json

Was this page helpful?