Skip to main content

Models

List image models

Image generation models, with a per-image credit price where the model has one. Free to call.

gethttps://api.pre.dev/v1/images/modelsTry it
curl -X GET "https://api.pre.dev/v1/images/models"
fetch("https://api.pre.dev/v1/images/models", {  method: "GET"})
package mainimport (  "fmt"  "net/http"  "io/ioutil")func main() {  url := "https://api.pre.dev/v1/images/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/images/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/images/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/images/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/images/models";  let res = client    .get(url)    .send()    .await?    .text()    .await?;  println!("{}", res);  Ok(())}
{  "data": [    {      "id": "bytedance-seed/seedream-5-0-lite",      "name": "ByteDance Seed: Seedream 5.0 Lite",      "architecture": {        "input_modalities": [          "text",          "image"        ],        "output_modalities": [          "image"        ]      },      "supported_parameters": {        "aspect_ratio": {          "type": "enum",          "values": [            "1:1",            "16:9",            "9:16"          ]        },        "n": {          "type": "range",          "min": 1,          "max": 4        }      },      "supports_streaming": false,      "predev": {        "credits_per_m_input": null,        "credits_per_m_output": null,        "credits_per_image": 0.5,        "billables": [          {            "billable": "output_image",            "unit": "image",            "credits": 0.5          }        ]      }    }  ]}
GET
/v1/images/models

Authorization

AuthorizationBearer <token>

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

In: header

Response Body

application/json

Image models.

TypeScript Definitions

Use the response body type in TypeScript.

application/json

application/json

application/json

application/json

Was this page helpful?