You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-references/service-endpoints/models-catalogue.md
+27-33Lines changed: 27 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,38 +5,14 @@ icon: list-tree
5
5
6
6
# Model Catalogue API
7
7
8
-
## List models
8
+
`GET /v1/models` returns the live model catalogue — the machine-readable source for which models exist, what they're called, what they can do, and what they cost.\
9
+
Use it instead of scraping the model pages. No API key is required for this request; you can also open [the endpoint](https://api.aimlapi.com/v1/models) directly in a browser.
9
10
10
-
`GET /v1/models` returns the live catalogue. It is the machine-readable source for which models exist, what they are called, what they can do, and what they cost — use it instead of scraping the model pages.
11
-
12
-
By default each entry carries only its identity. Pricing, modalities and capabilities are opt-in, so the default response stays small:
@@ -55,7 +31,7 @@ Unknown values are ignored rather than rejected, so a typo returns a valid respo
55
31
56
32
## Filtering
57
33
58
-
Every filter below narrows _which models_ come back. They are independent of `include`, so you can filter on capabilities without asking for the capabilities section.
34
+
Every filter below narrows _which models_ come back. Filters are independent of `include`, so you can filter on capabilities without asking for the capabilities section.
Returns the full list of models matching the given filters, with the requested optional sections attached.
62
+
63
+
## GET /v1/models
64
+
65
+
>
66
+
67
+
```json
68
+
{"openapi":"3.0.0","info":{"title":"AIML API","version":"1.0.0"},"servers":[{"url":"https://api.aimlapi.com"}],"paths":{"/v1/models":{"get":{"operationId":"ModelsController_getModelsV2","parameters":[{"name":"id","in":"query","required":false,"description":"Keep models matching this id, or carrying it as an alias. Comma-separated or repeated values are OR'd together.","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Keep models served through this endpoint type.","schema":{"type":"string"}},{"name":"tags","in":"query","required":false,"description":"Keep models carrying this tag, e.g. playground:video. Comma-separated or repeated values are OR'd together.","schema":{"type":"string"}},{"name":"modalities","in":"query","required":false,"description":"Keep models with this modality among either their input or output modalities.","schema":{"type":"string"}},{"name":"input_modalities","in":"query","required":false,"description":"Keep models accepting this input modality.","schema":{"type":"string"}},{"name":"output_modalities","in":"query","required":false,"description":"Keep models producing this output modality.","schema":{"type":"string"}},{"name":"capabilities","in":"query","required":false,"description":"Keep models declaring this capability, e.g. image_to_video. Comma-separated or repeated values are OR'd together; combining with other filter parameters is AND'd.","schema":{"type":"string"}},{"name":"include","in":"query","required":false,"description":"Attach optional sections to each model: pricing, modalities, capabilities, or all (?details=true is a synonym for all). Comma-separated. Unknown values are ignored rather than rejected.","schema":{"type":"string"}}],"responses":{"200":{"description":"The live model catalogue, filtered and expanded as requested. Responses carry an ETag; see Caching below.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","description":"Always \"list\"."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Canonical unique identifier of the model."},"aliases":{"type":"array","nullable":true,"description":"Other names this model can still be requested under.","items":{"type":"string"}},"type":{"type":"string","description":"Endpoint type this model is served through."},"info":{"type":"object","description":"Model identity.","properties":{"name":{"type":"string","description":"Human-readable model name."},"developer":{"type":"string","description":"Organization or company that developed the model."}},"required":["name","developer"]},"tags":{"type":"array","description":"Free-form tags, e.g. playground:tts.","items":{"type":"string"}},"pricing":{"type":"object","nullable":true,"description":"Present only with ?include=pricing or all. See Reading prices below."},"modalities":{"type":"object","nullable":true,"description":"Present only with ?include=modalities or all. Input and output modalities the model handles."},"capabilities":{"type":"array","nullable":true,"description":"Present only with ?include=capabilities or all. Declared capabilities, e.g. image_to_video.","items":{"type":"string"}}},"required":["id","type","info","tags"]}}},"required":["object","data"]}}}}}}}}}}
69
+
```
70
+
85
71
## Checking whether a model is still available
86
72
87
-
Match against **`id` and `aliases` together**. A model may be published under a canonical id while the name you integrated against lives on as an alias — the alias keeps working, but it is not the `id` any more, so an `id`-only comparison reports a live model as gone.
73
+
{% hint style="warning" %}
74
+
Match against **`id` and `aliases` together**, not `id` alone. A model may be published under a canonical id while the name you integrated against lives on as an alias — the alias keeps working, but it is not the `id` any more, so an `id`-only comparison reports a live model as gone.
The same map de-duplicates your list: two names resolving to one canonical id are one model, not two.
103
93
@@ -111,7 +101,9 @@ With `?include=pricing`, each model carries a `pricing` block. Read `kind` first
111
101
| `variants` | the rate depends on request parameters — `dimensions` names them, `variants[]` quotes a rate per combination |
112
102
| `variable` | the rate cannot be quoted ahead of the request |
113
103
114
-
**Always read `per` together with `price`.** `price` is the charge for `per` units, and `per` is not the same across models — `1000000` for most token rates, `1000` for some, `1` for per-second and per-megapixel rates. Comparing bare `price` values across models compares different bases and will be wrong by orders of magnitude.
104
+
{% hint style="warning" %}
105
+
Always read `per` together with `price`. `price` is the charge for `per` units, and `per` is not the same across models — `1000000` for most token rates, `1000` for some, `1` for per-second and per-megapixel rates. Comparing bare `price` values across models compares different bases and will be wrong by orders of magnitude.
The ETag covers the whole response, so it changes on any catalogue edit — a new model or a reworded description, not only a price change. Treat it as "something moved, re-read and diff", not as a price-change feed.
0 commit comments