List models
curl --request GET \
--url https://api.zerogen.com/v1/models \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerogen.com/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "<string>",
"name": "<string>",
"capability": "image",
"operation": "generate",
"status": "active",
"sunsetAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}Models
List models
The models this organization can run, one entry per model and operation. Read a model to get the JSON Schema its requests follow.
Needs the models:read scope.
GET
/
models
List models
curl --request GET \
--url https://api.zerogen.com/v1/models \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zerogen.com/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerogen.com/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "<string>",
"name": "<string>",
"capability": "image",
"operation": "generate",
"status": "active",
"sunsetAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"param": "<string>",
"details": {}
}
}Authorizations
A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.
Query Parameters
Available options:
image, video The model ID's operation segment
Available options:
generate, edit, inpaint, remix, text-to-vector, text-to-video, image-to-video, first-last-frame-to-video, reference-to-video, audio-to-video, video-to-video, extend-video, motion-control, clean-plate, render-to-real, hdr, outpaint, reference-video-to-video Search model IDs and labels, including the maker and related operations
Required string length:
1 - 200Video models accepting at least these frame slots
Available options:
start, start-end Video models that can generate audio
Allowed value:
"true"Models accepting reference media of this kind
Available options:
image, video, audio Models per page; default 20
Required range:
1 <= x <= 50nextCursor from the previous page, with the same filters