Catalogue
One type's models
GET /v1/embeddings/models, GET /v1/images/models and GET /v1/videos/models each list the
models of one type on sale, with their prices in DADAThe Algerian dinar, the one currency the docs show.More on Balance and charges →.
Request
Send it with an API keyAPI keyThe key you create and send with every request that calls a model.More on API keys →. It takes no field: the address names the type. The Models guide lists every model at once.
| Route | Lists |
|---|---|
GET /v1/embeddings/models | the embeddings models |
GET /v1/images/models | the picture models |
GET /v1/videos/models | the video models, with what each can make |
import json
import os
import urllib.request
API_KEY = os.environ["OPENDUNES_API_KEY"]
ADDRESS = "https://opendunes.com/v1/videos/models"
request = urllib.request.Request(
ADDRESS,
headers={"Authorization": "Bearer " + API_KEY},
)
with urllib.request.urlopen(request) as response:
models = json.load(response)["data"]
for model in models:
print(
model["id"],
model["supported_durations"],
model["supported_resolutions"],
)Response
200 OK.
| Field | Holds |
|---|---|
data | the models of that type, newest first, each as All models describes a model: its id, its pricing in DA and the rest |
A video model also holds what it can make. Each is null where the model does not say.
| Field | Holds |
|---|---|
supported_resolutions | the resolutions it makes, such as 720p or 1080p |
supported_aspect_ratios | the shapes it makes, such as 16:9 or 9:16 |
supported_sizes | the sizes it makes, width by height |
supported_durations | the clip lengths it makes, in seconds |
supported_frame_images | the frames it can start or end on, first_frame or last_frame |
upscale_factor | on a model that upscales a clip: how far it can enlarge one |
creativity | on a model that upscales a clip: the creativity levels it takes |
generate_audio | whether it can make the clip's sound |
seed | whether a seed makes a clip repeatable |
allowed_passthrough_parameters | the provider's own settings it accepts, under provider |
pricing_skus | its price for each kind of output, in DA, each a string per unit, with discount beside them |
What it cost
Free. Reading the catalogue is never charged.
Errors
error.code carries the status, and error.message says why.
| Status | When |
|---|---|
| 401 | the key is missing, wrong, disabled or expired |
| 403 | the key answers only from the addresses set on it, and this request came from another |
| 503 | the video models could not be read just now; Retry-After says how many seconds to wait |
Last modified on