opendunes
Catalogue
Copy page ▾

All providers

GET /v1/providers lists every provider that serves models, with where it is based and its policies.

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 Models guide says how a model is named and served.

import json
import os
import urllib.request

API_KEY = os.environ["OPENDUNES_API_KEY"]
ADDRESS = "https://opendunes.com/v1/providers"

request = urllib.request.Request(
    ADDRESS,
    headers={"Authorization": "Bearer " + API_KEY},
)
with urllib.request.urlopen(request) as response:
    providers = json.load(response)["data"]

for provider in providers:
    print(provider["slug"], provider["name"], provider["headquarters"])

Response

200 OK.

FieldHolds
dataevery provider
namein each: the provider's name
slugin each: its short name, the one provider.only, provider.order and provider.ignore take
privacy_policy_urlin each: the address of its privacy policy, or null
terms_of_service_urlin each: the address of its terms of service, or null
status_page_urlin each: the address of its status page, or null
headquartersin each: the country it is based in, as a two-letter code, or null
datacentersin each: the countries its datacenters are in, as two-letter codes, or null

What it cost

Free. Reading the catalogue is never charged.

Errors

error.code carries the status, and error.message says why.

StatusWhen
401the key is missing, wrong, disabled or expired
403the key answers only from the addresses set on it, and this request came from another
503the providers could not be read just now; Retry-After says how many seconds to wait

Last modified on