Catalogue
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.
| Field | Holds |
|---|---|
data | every provider |
name | in each: the provider's name |
slug | in each: its short name, the one provider.only, provider.order and provider.ignore take |
privacy_policy_url | in each: the address of its privacy policy, or null |
terms_of_service_url | in each: the address of its terms of service, or null |
status_page_url | in each: the address of its status page, or null |
headquarters | in each: the country it is based in, as a two-letter code, or null |
datacenters | in 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.
| 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 providers could not be read just now; Retry-After says how many seconds to wait |
Last modified on