# Novita AI Query Model API | Access Public & Private Model Details

> Discover Novita AIâ€™s Query Model API, enabling seamless retrieval of detailed information on public and private models. Get insights into model specifications, status, usage guidelines, and more. Optimize your AI development with comprehensive API documentation and examples.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/model-apis-get-model

# Get Model

GET

/

v3

/

model

Try it

Get Model

cURL

```
curl --request GET \
--url https://api.novita.ai/v3/model \
--header 'Authorization: &#x3C;authorization>' \
--header 'Content-Type: &#x3C;content-type>'
```

```
import requestsurl = "https://api.novita.ai/v3/model"headers = { "Content-Type": "&#x3C;content-type>", "Authorization": "&#x3C;authorization>"}response = requests.get(url, headers=headers)print(response.text)
```

```
const options = { method: 'GET', headers: {'Content-Type': '&#x3C;content-type>', Authorization: '&#x3C;authorization>'}};fetch('https://api.novita.ai/v3/model', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
```

```
&#x3C;?php$curl = curl_init();curl_setopt_array($curl, [ CURLOPT_URL => "https://api.novita.ai/v3/model", 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: &#x3C;authorization>", "Content-Type: &#x3C;content-type>" ],]);$response = curl_exec($curl);$err = curl_error($curl);curl_close($curl);if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
```

```
package mainimport (	"fmt"	"net/http"	"io")func main() {	url := "https://api.novita.ai/v3/model"	req, _ := http.NewRequest("GET", url, nil)	req.Header.Add("Content-Type", "&#x3C;content-type>")	req.Header.Add("Authorization", "&#x3C;authorization>")	res, _ := http.DefaultClient.Do(req)	defer res.Body.Close()	body, _ := io.ReadAll(res.Body)	fmt.Println(string(body))}
```

```
HttpResponse&#x3C;String> response = Unirest.get("https://api.novita.ai/v3/model") .header("Content-Type", "&#x3C;content-type>") .header("Authorization", "&#x3C;authorization>") .asString();
```

```
require 'uri'require 'net/http'url = URI("https://api.novita.ai/v3/model")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Content-Type"] = '&#x3C;content-type>'request["Authorization"] = '&#x3C;authorization>'response = http.request(request)puts response.read_body
```

200

```
{
"models": [
{
"id": 123,
"name": "&#x3C;string>",
"hash_sha256": "&#x3C;string>",
"sd_name": "&#x3C;string>",
"type": {
"name": "&#x3C;string>",
"display_name": "&#x3C;string>"
},
"categories": [
"&#x3C;string>"
],
"status": 123,
"download_url": "&#x3C;string>",
"tags": [
"&#x3C;string>"
],
"cover_url": "&#x3C;string>",
"source": "&#x3C;string>",
"base_model": "&#x3C;string>",
"base_model_type": "&#x3C;string>",
"download_url_ttl": 123,
"sd_name_in_api": "&#x3C;string>"
}
],
"pagination": {
"next_cursor": "&#x3C;string>"
}
}
```

This API endpoint is designed to retrieve information on both public and private models. It allows users to access details such as model specifications, status, and usage guidelines, ensuring comprehensive insights into the available modeling resources.

##

[​](#request-headers)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

Bearer authentication format, for example: Bearer {{API Key}}.

##

[​](#query-parameters)

Query Parameters

[​](#param-filter-visibility)

filter.visibility

string

Model types: `public` or `private`. If not set, the interface will query all types of models.

[​](#param-filter-source)

filter.source

string

Source of the model.

Enum: `civitai`, `training`, `uploading`

[​](#param-filter-types)

filter.types

string

Specifies the types of models to include in the query.

Enum: `checkpoint`, `lora`, `vae`, `controlnet`, `upscaler`, `textualinversion`

[​](#param-filter-is-sdxl)

filter.is_sdxl

boolean

Whether the model is SDXL or not. Setting this parameter to `true` includes only SDXL models in the query results, which are typically large-scale, high-performance models designed for extensive data processing tasks. Conversely, setting it to `false` excludes these models from the results. If left unspecified, the filter will not discriminate based on the SDXL classification, including all model types in the search results.

[​](#param-filter-query)

filter.query

string

Searches the content of sd_name, name, and tags.

[​](#param-filter-is-inpainting)

filter.is_inpainting

boolean

If set to true, it will filter out the checkpoints used for inpainting. The default is false.

[​](#param-pagination-limit)

pagination.limit

string

Number of models to query per request, range (0, 100].

[​](#param-pagination-cursor)

pagination.cursor

string

pagination.cursor is used to specify which record to start returning from. If it is empty, it means to get it from the beginning. Generally, the content of the next page is obtained by passing in the next_cursor field value from the response packet.

##

[​](#response)

Response

[​](#param-models)

models

object[]

Show properties

[​](#param-id)

id

integer

ID of the model.

[​](#param-name)

name

string

Model name.

[​](#param-hash-sha256)

hash_sha256

string

Hash of the model file.

[​](#param-sd-name)

sd_name

string

Model file name.

[​](#param-type)

type

object

Show properties

[​](#param-name-1)

name

string

Model type name.

[​](#param-display-name)

display_name

string

[​](#param-categories)

categories

string[]

Model categories.

[​](#param-status)

status

integer

Model status: 0 for unavailable, 1 for available.

[​](#param-download-url)

download_url

string

Model download URL.

[​](#param-tags)

tags

string[]

Model tags, such as photorealistic, anatomical, base model, CGI, realistic, semi-realistic.

[​](#param-cover-url)

cover_url

string

Model cover image URL.

[​](#param-source)

source

string

The source of the model, such as civitai, training, uploading.

[​](#param-base-model)

base_model

string

Base model of the model, such as SD 1.5 or SDXL 1.0.

[​](#param-base-model-type)

base_model_type

string

Base model type of the model, such as Inpainting or Standard.

[​](#param-download-url-ttl)

download_url_ttl

integer

The expiration time of the download URL in seconds, default is 1 day.

[​](#param-sd-name-in-api)

sd_name_in_api

string

The name users can add in the interface.

[​](#param-pagination)

pagination

object

Show properties

[​](#param-next-cursor)

next_cursor

string

Next request starting cursor.

##

[​](#example)

Example

request

```
curl --location 'https://api.novita.ai/v3/model?filter.visibility=public&pagination.limit=2&pagination.cursor=c_0' \
--header 'Authorization: Bearer {{API Key}}'
```

response

```
{
"models": [
{
"id": 114600,
"name": "V4.0-inpainting (VAE)",
"hash_sha256": "1A805277C8",
"sd_name": "realisticVisionV40_v40VAE-inpainting_81543.safetensors",
"type": {
"name": "checkpoint",
"display_name": "Checkpoint"
},
"categories": [],
"status": 1,
"tags": [
"photorealistic",
"anatomical",
"base model",
"cgi",
"realistic",
"semi-realistic"
],
"cover_url": "https://next-app-static.s3.amazonaws.com/images-prod/xG1nkqKTMzGDvpLrqFT7WA/f291a219-4a86-45ab-96eb-c53446b3e4df/width=450/1495044.jpeg",
"base_model": "SD 1.5",
"base_model_type": "Inpainting",
"download_url_ttl": 2592000,
"sd_name_in_api": "realisticVisionV40_v40VAE-inpainting_81543.safetensors",
"is_sdxl": false
},
{
"id": 55199,
"name": "beta2",
"hash_sha256": "BA43B0EFEE",
"sd_name": "GoodHands-beta2_39807.safetensors",
"type": {
"name": "locon",
"display_name": "locon"
},
"categories": [],
"status": 1,
"tags": ["photorealistic", "concept", "hands"],
"cover_url": "https://next-app-static.s3.amazonaws.com/images-prod/xG1nkqKTMzGDvpLrqFT7WA/031a378c-3d66-45da-5d67-966c47cd4800/width=450/599083.jpeg",
"base_model": "SD 1.5",
"base_model_type": "Standard",
"download_url_ttl": 2592000,
"sd_name_in_api": "GoodHands-beta2_39807",
"is_sdxl": false
}
],
"pagination": {
"next_cursor": "c_WzgwNDY2NiwiNTUxOTkiXQ=="
}
}
```

Last modified on December 25, 2024
