From 96947a76816a47ee3181264c19d75e990e01d525 Mon Sep 17 00:00:00 2001 From: dazzatronus Date: Fri, 25 Sep 2026 20:36:26 +1000 Subject: [PATCH] feat: report whether the calling account can use each generation model --- paths/models.yaml | 3 +++ schemas/generationmodel.yaml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/paths/models.yaml b/paths/models.yaml index 1782a86..9fa0b97 100644 --- a/paths/models.yaml +++ b/paths/models.yaml @@ -10,6 +10,9 @@ Option schemas are omitted by default. Request them with `expand=options`. + Each model's `available` reflects the plan of the account behind the calling API + key, so offer only the models it marks available. + **Base URL:** https://api.shotstack.io/edit/{version} summary: List Generation Models operationId: getModels diff --git a/schemas/generationmodel.yaml b/schemas/generationmodel.yaml index 2dd2c0d..e0ad39f 100644 --- a/schemas/generationmodel.yaml +++ b/schemas/generationmodel.yaml @@ -39,6 +39,25 @@ schema are rejected. type: object additionalProperties: true + available: + description: >- + Whether the account behind the calling API key can generate with this model. + Omitted when that cannot be determined; treat a missing value as unknown, not + as available. Generation requests are checked either way. + type: boolean + example: false + unavailableReason: + description: >- + Why `available` is false. `AiCapabilityNotIncluded`: the account's plan does + not include this kind of generation. `AiDisabled`: AI generation is turned + off for the account. `AiAccessUnavailable`: access could not be confirmed; + try again later. + type: string + enum: + - AiCapabilityNotIncluded + - AiDisabled + - AiAccessUnavailable + example: AiCapabilityNotIncluded required: - model - type