{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/monid/main/json-schema/monid-provider-resources-response-schema.json", "title": "ProviderResourcesResponse", "x-generated": "2026-10-07", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/monid-public-registry-api-openapi.yml#/components/schemas/ProviderResourcesResponse", "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/ProviderResource" } } }, "required": [ "items" ], "$defs": { "ProviderResource": { "type": "object", "properties": { "provider": { "type": "string" }, "providerDisplayName": { "type": "string" }, "providerUrl": { "type": "string", "format": "uri", "description": "The provider's website, when known." }, "providerDocsUrl": { "type": "string", "format": "uri", "description": "The provider's API docs, when known." }, "resource": { "type": "string", "description": "Resource slug — unique with `provider`." }, "resourceType": { "type": "string" }, "displayName": { "type": "string" }, "displayDescription": { "type": "string" }, "summary": { "type": "string" }, "pricing": { "type": "object", "properties": { "rent": { "$ref": "#/$defs/ResourceRent" }, "rateCard": { "type": "array", "items": { "$ref": "#/$defs/ResourceRateLine" }, "description": "Metered usage rates (empty when the resource is not usage-billed)." }, "firstPeriodChargedAtCreation": { "type": "boolean", "description": "True when the call that creates the resource charges the first rent period (so the rent is not charged twice)." } }, "required": [ "rent", "rateCard", "firstPeriodChargedAtCreation" ] }, "endpoints": { "type": "array", "items": { "$ref": "#/$defs/ResourceEndpoint" }, "description": "The endpoints that operate on this resource and are visible to the caller, with what each does to it." }, "categories": { "type": "array", "items": { "type": "string" }, "description": "Category node ids — the union of those endpoints' categories." } }, "required": [ "provider", "providerDisplayName", "resource", "resourceType", "displayName", "displayDescription", "summary", "pricing", "endpoints", "categories" ] }, "PublicPrice": { "type": "object", "properties": { "type": { "type": "string" }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "flatFee": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "period": { "type": "object", "properties": { "unit": { "type": "string", "enum": [ "MINUTE", "DAY", "MONTH" ] }, "count": { "type": "integer", "exclusiveMinimum": 0 } }, "required": [ "unit", "count" ] }, "per": { "anyOf": [ { "type": "object", "properties": { "unit": { "type": "string", "enum": [ "MINUTE", "DAY", "MONTH" ] }, "count": { "type": "integer", "exclusiveMinimum": 0 } }, "required": [ "unit", "count" ] }, { "type": "number" } ] }, "unit": { "type": "string", "enum": [ "token", "character", "second", "image", "credit", "result", "gb-month", "step" ] }, "default": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_CALL" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] } }, "required": [ "type", "amount" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_RESULT" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "flatFee": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] } }, "required": [ "type", "amount" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "METERED" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "per": { "type": "object", "properties": { "unit": { "type": "string", "enum": [ "MINUTE", "DAY", "MONTH" ] }, "count": { "type": "integer", "exclusiveMinimum": 0 } }, "required": [ "unit", "count" ] } }, "required": [ "type", "amount", "per" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_UNIT" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "per": { "type": "number" }, "unit": { "type": "string", "enum": [ "token", "character", "second", "image", "credit", "result", "gb-month", "step" ] } }, "required": [ "type", "amount", "per", "unit" ] } ] }, "selectors": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "key": { "type": "string" }, "in": { "type": "string", "enum": [ "body", "queryParam", "pathParam", "output" ] }, "offset": { "type": "integer", "minimum": 0 } }, "required": [ "label", "key", "in" ] } }, "variants": { "type": "array", "items": { "type": "object", "properties": { "when": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "price": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_CALL" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] } }, "required": [ "type", "amount" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_RESULT" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "flatFee": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] } }, "required": [ "type", "amount" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "METERED" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "per": { "type": "object", "properties": { "unit": { "type": "string", "enum": [ "MINUTE", "DAY", "MONTH" ] }, "count": { "type": "integer", "exclusiveMinimum": 0 } }, "required": [ "unit", "count" ] } }, "required": [ "type", "amount", "per" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_UNIT" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "per": { "type": "number" }, "unit": { "type": "string", "enum": [ "token", "character", "second", "image", "credit", "result", "gb-month", "step" ] } }, "required": [ "type", "amount", "per", "unit" ] } ] }, "label": { "type": "string" } }, "required": [ "when", "price" ] } }, "tiers": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "when": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } }, "selector": { "type": "object", "properties": { "label": { "type": "string" }, "key": { "type": "string" }, "in": { "type": "string", "enum": [ "body", "queryParam", "pathParam", "output" ] }, "offset": { "type": "integer", "minimum": 0 } }, "required": [ "label", "key", "in" ] }, "price": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_CALL" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] } }, "required": [ "type", "amount" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_RESULT" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "flatFee": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] } }, "required": [ "type", "amount" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "METERED" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "per": { "type": "object", "properties": { "unit": { "type": "string", "enum": [ "MINUTE", "DAY", "MONTH" ] }, "count": { "type": "integer", "exclusiveMinimum": 0 } }, "required": [ "unit", "count" ] } }, "required": [ "type", "amount", "per" ] }, { "type": "object", "properties": { "type": { "type": "string", "enum": [ "PER_UNIT" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "per": { "type": "number" }, "unit": { "type": "string", "enum": [ "token", "character", "second", "image", "credit", "result", "gb-month", "step" ] } }, "required": [ "type", "amount", "per", "unit" ] } ] } }, "required": [ "label", "price" ] } } }, "required": [ "type", "amount" ], "description": "User-facing price (markup applied)." }, "ResourceEndpoint": { "type": "object", "properties": { "endpoint": { "type": "string" }, "displayName": { "type": "string" }, "price": { "$ref": "#/$defs/PublicPrice" }, "effects": { "type": "array", "items": { "type": "string", "enum": [ "create", "read", "update", "delete" ] }, "description": "What this endpoint does to the resource (derived from the endpoint's resource lifecycle)." } }, "required": [ "endpoint", "displayName", "price", "effects" ] }, "ResourceRateLine": { "type": "object", "properties": { "label": { "type": "string" }, "ratePerUnit": { "type": "number", "description": "USD per `per` unit." }, "per": { "type": "string" } }, "required": [ "label", "ratePerUnit", "per" ] }, "ResourceRent": { "type": [ "object", "null" ], "properties": { "type": { "type": "string", "enum": [ "BY_PERIOD" ] }, "amount": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string", "enum": [ "USD" ] } }, "required": [ "value", "currency" ] }, "period": { "type": "object", "properties": { "unit": { "type": "string", "enum": [ "MINUTE", "DAY", "MONTH" ] }, "count": { "type": "integer", "exclusiveMinimum": 0 } }, "required": [ "unit", "count" ] } }, "required": [ "type", "amount", "period" ], "description": "Recurring rent, or null when the resource charges no rent (free to hold, or billed by usage only)." } } }