Models
Model catalog
Read-only catalog endpoints with credit prices, refreshed every 15 minutes.
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.
| Method | Path | Returns |
|---|---|---|
| GET | /v1/models | All models, each row with a predev price object |
| GET | /v1/models/count | Number of models in /v1/models |
| GET | /v1/embeddings/models | Embedding models |
| GET | /v1/images/models | Image generation models |
| GET | /v1/videos/models | Video generation models |
| GET | /v1/models/public | Every 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):
| Field | Unit | Present when |
|---|---|---|
credits_per_m_input | Credits per million input tokens | Always; null when the model has no token price |
credits_per_m_output | Credits per million output tokens | Always; null when the model has no token price |
credits_per_m_cache_read | Credits per million cached input tokens read | The model prices cache reads |
credits_per_m_cache_write | Credits per million tokens written to cache | The model prices cache writes |
credits_per_image | Credits per image | The model prices images |
credits_per_request | Credits per request | The model has a per-request price |
credits_per_second_output | Credits per second of generated video | Video models priced by the second |
credits_per_m_video_tokens | Credits per million video tokens | Video models priced by the token |
credits_per_m_output_image_tokens | Credits per million generated image tokens | Image models priced by the token |
billables | Each 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}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
Missing or invalid API key.
TypeScript Definitions
Use the response body type in TypeScript.
An error raised by pre.dev, in the OpenAI error shape with an extra predev object (absent on catalog_unavailable from the catalog listings). Branch on error.code.
application/json
More than 30 failed key attempts from this IP address in the current minute.
TypeScript Definitions
Use the response body type in TypeScript.
An error raised by pre.dev, in the OpenAI error shape with an extra predev object (absent on catalog_unavailable from the catalog listings). Branch on error.code.
application/json
Unexpected error.
TypeScript Definitions
Use the response body type in TypeScript.
An error raised by pre.dev, in the OpenAI error shape with an extra predev object (absent on catalog_unavailable from the catalog listings). Branch on error.code.
application/json
The catalog could not be read and no copy was cached. Retry shortly.
TypeScript Definitions
Use the response body type in TypeScript.
An error raised by pre.dev, in the OpenAI error shape with an extra predev object (absent on catalog_unavailable from the catalog listings). Branch on error.code.