railyard/apps/vend/crates/vend-server/openapi-control.json
caelum0x 4bb1472e3e feat(vend): white-label "your own OpenRouter" kit
Vend + Relay + Mint white-label kit: self-serve workspace signup
(POST /v1/auth/signup, off by default), per-app model pricing with markup,
end-user wallets and top-ups, tenant earnings, migration 0009_whitelabel,
customer console and operator admin pages for the new flows, and matching
TypeScript/Python SDK and mint-client updates. Covered by
tests/whitelabel_flow.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:41:49 +03:00

109 lines
25 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Vend Control Plane",
"version": "0.1.0",
"description": "Authenticated operator API for Vend tenant products, apps, keys, end users, and daily spend. All responses use Vend's success/error envelope."
},
"servers": [{"url": "/"}],
"security": [{"adminBearer": []}],
"paths": {
"/v1/auth/setup": {
"post": {"security": [], "summary": "Consume a one-time invitation token and set an Argon2id password", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["setup_token", "password"], "properties": {"setup_token": {"type": "string"}, "password": {"type": "string", "minLength": 12, "maxLength": 256}}}}}}, "responses": {"200": {"description": "Activated membership"}, "401": {"description": "Invalid, expired, or consumed setup token"}, "429": {"$ref": "#/components/responses/RateLimited"}}}
},
"/v1/auth/login": {
"post": {"security": [], "summary": "Email/password login for an active tenant membership", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["tenant_id", "email", "password"], "properties": {"tenant_id": {"type": "string"}, "email": {"type": "string", "format": "email"}, "password": {"type": "string"}}}}}}, "responses": {"200": {"description": "One-time plaintext, expiring session bearer; Cache-Control: no-store"}, "401": {"description": "Invalid credentials or inactive membership"}, "429": {"$ref": "#/components/responses/RateLimited"}}}
},
"/v1/auth/github/start": {"get": {"security": [], "summary": "Start GitHub OAuth with PKCE", "parameters": [{"$ref": "#/components/parameters/TenantIdQuery"}], "responses": {"303": {"description": "Redirect to GitHub"}, "429": {"$ref": "#/components/responses/RateLimited"}, "503": {"description": "GitHub login is unconfigured"}}}},
"/v1/auth/github/callback": {"get": {"security": [], "summary": "GitHub OAuth callback; verified primary email must match an invited membership", "responses": {"200": {"description": "Vend session bearer"}, "401": {"description": "OAuth or membership validation failed"}, "429": {"$ref": "#/components/responses/RateLimited"}}}},
"/v1/auth/google/start": {"get": {"security": [], "summary": "Start Google OIDC with PKCE and nonce", "parameters": [{"$ref": "#/components/parameters/TenantIdQuery"}], "responses": {"303": {"description": "Redirect to Google"}, "429": {"$ref": "#/components/responses/RateLimited"}, "503": {"description": "Google login is unconfigured"}}}},
"/v1/auth/google/callback": {"get": {"security": [], "summary": "Google OIDC callback; validates JWKS signature, issuer, audience, expiry, nonce, and verified email", "responses": {"200": {"description": "Vend session bearer"}, "401": {"description": "OIDC or membership validation failed"}, "429": {"$ref": "#/components/responses/RateLimited"}}}},
"/v1/customer/tenant": {"get": {"security": [{"customerSession": []}], "summary": "Get the authenticated membership's tenant", "responses": {"200": {"description": "Tenant"}, "401": {"$ref": "#/components/responses/Unauthorized"}}}},
"/v1/customer/apps": {
"get": {"security": [{"customerSession": []}], "summary": "List own-tenant apps (viewer+) ", "responses": {"200": {"description": "App list"}}},
"post": {"security": [{"customerSession": []}], "summary": "Create own-tenant app (admin+)", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateApp"}}}}, "responses": {"200": {"description": "Created app"}, "403": {"$ref": "#/components/responses/Forbidden"}}}
},
"/v1/customer/apps/{app_id}": {"get": {"security": [{"customerSession": []}], "summary": "Get an own-tenant app (viewer+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "App"}, "404": {"description": "Missing or belongs to another tenant"}}}},
"/v1/customer/apps/{app_id}/funding-checkout": {"post": {"security": [{"customerSession": []}], "summary": "Create a hosted checkout depositing directly into the app Mint reserve (admin+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FundingCheckoutRequest"}}}}, "responses": {"200": {"description": "Hosted checkout URL; Cache-Control: no-store"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"description": "Missing or belongs to another tenant"}}}},
"/v1/customer/apps/{app_id}/enabled": {"patch": {"security": [{"customerSession": []}], "summary": "Enable or disable an own-tenant app (admin+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "Updated app"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"description": "Missing or belongs to another tenant"}}}},
"/v1/customer/apps/{app_id}/usage": {"get": {"security": [{"customerSession": []}], "summary": "Read own-tenant daily usage (viewer+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "Usage totals"}, "404": {"description": "Missing or belongs to another tenant"}}}},
"/v1/customer/apps/{app_id}/keys": {
"get": {"security": [{"customerSession": []}], "summary": "List own-tenant provisioning key metadata (viewer+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "Safe key metadata"}}},
"post": {"security": [{"customerSession": []}], "summary": "Issue own-tenant provisioning key (admin+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "One-time plaintext provisioning key"}, "403": {"$ref": "#/components/responses/Forbidden"}}}
},
"/v1/customer/apps/{app_id}/end-users": {"post": {"security": [{"customerSession": []}], "summary": "Provision own-tenant end-user mapping (admin+)", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "End-user mapping"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"description": "Missing or belongs to another tenant"}}}},
"/v1/customer/keys/{key_id}": {"delete": {"security": [{"customerSession": []}], "summary": "Revoke own-tenant provisioning key (admin+)", "responses": {"200": {"description": "Revoked key"}, "403": {"$ref": "#/components/responses/Forbidden"}, "404": {"description": "Missing or belongs to another tenant"}}}},
"/v1/customer/users": {
"get": {"security": [{"customerSession": []}], "summary": "List tenant memberships (owner)", "responses": {"200": {"description": "Membership list"}, "403": {"$ref": "#/components/responses/Forbidden"}}},
"post": {"security": [{"customerSession": []}], "summary": "Invite tenant member (owner); returns setup token once", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteUser"}}}}, "responses": {"200": {"description": "Invitation and one-time setup token"}, "403": {"$ref": "#/components/responses/Forbidden"}}}
},
"/v1/customer/users/{user_id}": {"patch": {"security": [{"customerSession": []}], "summary": "Change membership role or disabled status (owner)", "responses": {"200": {"description": "Updated membership"}, "403": {"$ref": "#/components/responses/Forbidden"}, "409": {"description": "Would remove the last active owner"}}}},
"/v1/customer/users/{user_id}/sessions": {"delete": {"security": [{"customerSession": []}], "summary": "Revoke all sessions for a tenant membership (owner)", "responses": {"200": {"description": "Revoked session count"}, "403": {"$ref": "#/components/responses/Forbidden"}}}},
"/v1/customer/logout": {"post": {"security": [{"customerSession": []}], "summary": "Revoke current session", "responses": {"200": {"description": "Logged out"}}}},
"/v1/customer/session/rotate": {"post": {"security": [{"customerSession": []}], "summary": "Atomically revoke the current session and return one replacement bearer", "responses": {"200": {"description": "One-time replacement session bearer; Cache-Control: no-store"}, "401": {"$ref": "#/components/responses/Unauthorized"}}}},
"/v1/customer/password": {"patch": {"security": [{"customerSession": []}], "summary": "Change native password and revoke every other principal session", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["current_password", "new_password"], "properties": {"current_password": {"type": "string", "minLength": 12, "maxLength": 256}, "new_password": {"type": "string", "minLength": 12, "maxLength": 256}}}}}}, "responses": {"200": {"description": "Password changed and other session count returned; Cache-Control: no-store"}, "401": {"description": "Current password or session is invalid"}}}},
"/v1/control/tenants/{tenant_id}/users": {
"get": {"summary": "List tenant memberships", "parameters": [{"$ref": "#/components/parameters/TenantId"}], "responses": {"200": {"description": "Membership list"}}},
"post": {"summary": "Invite a tenant member and return setup token once", "parameters": [{"$ref": "#/components/parameters/TenantId"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteUser"}}}}, "responses": {"200": {"description": "Invitation"}}}
},
"/v1/control/tenants": {
"get": {"summary": "List tenants", "responses": {"200": {"description": "Tenant list"}, "401": {"$ref": "#/components/responses/Unauthorized"}}},
"post": {"summary": "Atomically create a tenant, first app, policy, and provisioning key", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BootstrapRequest"}}}}, "responses": {"200": {"description": "Product and one-time plaintext provisioning key"}, "401": {"$ref": "#/components/responses/Unauthorized"}}}
},
"/v1/control/tenants/{tenant_id}": {
"get": {"summary": "Get a tenant", "parameters": [{"$ref": "#/components/parameters/TenantId"}], "responses": {"200": {"description": "Tenant"}, "404": {"description": "Not found"}}}
},
"/v1/control/tenants/{tenant_id}/apps": {
"get": {"summary": "List tenant apps", "parameters": [{"$ref": "#/components/parameters/TenantId"}], "responses": {"200": {"description": "App list"}}},
"post": {"summary": "Create an app", "parameters": [{"$ref": "#/components/parameters/TenantId"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateApp"}}}}, "responses": {"200": {"description": "Created app"}}}
},
"/v1/control/apps/{app_id}": {
"get": {"summary": "Get an app", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "App"}, "404": {"description": "Not found"}}}
},
"/v1/control/apps/{app_id}/enabled": {
"patch": {"summary": "Enable or disable an app", "parameters": [{"$ref": "#/components/parameters/AppId"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["enabled"], "properties": {"enabled": {"type": "boolean"}}}}}}, "responses": {"200": {"description": "Updated app"}}}
},
"/v1/control/apps/{app_id}/keys": {
"get": {"summary": "List safe app key metadata", "parameters": [{"$ref": "#/components/parameters/AppId"}], "responses": {"200": {"description": "Key metadata without hashes or plaintext"}}},
"post": {"summary": "Issue an app provisioning key", "parameters": [{"$ref": "#/components/parameters/AppId"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/IssueKey"}}}}, "responses": {"200": {"description": "Key metadata and one-time plaintext secret"}}}
},
"/v1/control/keys/{key_id}": {
"delete": {"summary": "Revoke a provisioning key", "parameters": [{"name": "key_id", "in": "path", "required": true, "schema": {"type": "string", "pattern": "^sub_key_[0-9A-HJKMNP-TV-Z]{26}$"}}], "responses": {"200": {"description": "Revoked key metadata"}, "404": {"description": "Not found"}}}
},
"/v1/control/apps/{app_id}/end-users": {
"post": {"summary": "Provision an app end user with an existing Mint account", "parameters": [{"$ref": "#/components/parameters/AppId"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["external_ref", "mint_account_id"], "properties": {"external_ref": {"type": "string", "minLength": 1}, "mint_account_id": {"type": "string", "minLength": 1}}}}}}, "responses": {"200": {"description": "Provisioned or idempotently existing end user"}, "409": {"description": "External reference already points at another Mint account"}}}
},
"/v1/control/apps/{app_id}/usage": {
"get": {"summary": "Get billed and pending app spend for one UTC day", "parameters": [{"$ref": "#/components/parameters/AppId"}, {"name": "utc_day", "in": "query", "schema": {"type": "string", "format": "date"}, "description": "Defaults to the current UTC day"}], "responses": {"200": {"description": "Request counts, pending authorization, and captured billed spend in microdollars"}}}
},
"/v1/auth/signup": {"get": {"summary": "Whether self-serve signup is enabled, with the default terms", "responses": {"200": {"description": "Signup options"}}, "security": []}, "post": {"summary": "Self-serve workspace signup: tenant, first app, live provisioning key and owner session", "responses": {"200": {"description": "Workspace created; one-time provisioning key and session"}, "400": {"description": "Invalid input"}, "429": {"description": "Rate limited"}, "503": {"description": "Signup disabled by the operator"}}, "security": [], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["workspace_name", "email", "display_name", "password"], "properties": {"workspace_name": {"type": "string"}, "email": {"type": "string"}, "display_name": {"type": "string"}, "password": {"type": "string", "minLength": 12}, "app_name": {"type": "string"}}}}}}}},
"/v1/customer/apps/{app_id}/model-pricing": {"get": {"summary": "Price sheet: provider rates, per-model overrides and effective end-user rates", "responses": {"200": {"description": "Price sheet"}, "404": {"description": "Unknown app"}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}], "security": [{"customerSession": []}]}, "put": {"summary": "Set a per-model markup override (admin)", "responses": {"200": {"description": "Updated price sheet"}, "400": {"description": "Model not priced/allowed or markup out of range"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["model", "markup_bps"], "properties": {"model": {"type": "string"}, "markup_bps": {"type": "integer", "minimum": 0, "maximum": 1000000}, "min_fee_micros": {"type": "integer", "minimum": 0}}}}}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}], "security": [{"customerSession": []}]}, "delete": {"summary": "Clear a per-model override (admin)", "responses": {"200": {"description": "Updated price sheet"}, "404": {"description": "No override"}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "model", "in": "query", "required": true, "schema": {"type": "string"}}], "security": [{"customerSession": []}]}},
"/v1/control/apps/{app_id}/model-pricing": {"get": {"summary": "Price sheet: provider rates, per-model overrides and effective end-user rates", "responses": {"200": {"description": "Price sheet"}, "404": {"description": "Unknown app"}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}]}, "put": {"summary": "Set a per-model markup override (admin)", "responses": {"200": {"description": "Updated price sheet"}, "400": {"description": "Model not priced/allowed or markup out of range"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["model", "markup_bps"], "properties": {"model": {"type": "string"}, "markup_bps": {"type": "integer", "minimum": 0, "maximum": 1000000}, "min_fee_micros": {"type": "integer", "minimum": 0}}}}}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}]}, "delete": {"summary": "Clear a per-model override (admin)", "responses": {"200": {"description": "Updated price sheet"}, "404": {"description": "No override"}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "model", "in": "query", "required": true, "schema": {"type": "string"}}]}},
"/v1/customer/apps/{app_id}/wallets": {"get": {"summary": "End-user wallets with live Mint balances", "responses": {"200": {"description": "Wallet list"}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}, {"name": "offset", "in": "query", "schema": {"type": "integer"}}], "security": [{"customerSession": []}]}, "post": {"summary": "Create (idempotently) an end-user wallet (admin)", "responses": {"200": {"description": "Wallet"}, "409": {"description": "End user exists without a wallet"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["external_ref"], "properties": {"external_ref": {"type": "string", "maxLength": 128}}}}}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}], "security": [{"customerSession": []}]}},
"/v1/customer/apps/{app_id}/wallets/{external_ref}/top-ups": {"post": {"summary": "Hosted top-up checkout into an end-user wallet (admin)", "responses": {"200": {"description": "Checkout URL"}, "400": {"description": "Unknown provider or amount"}}, "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["provider", "amount_micros"], "properties": {"provider": {"type": "string", "enum": ["creem", "polar", "paypal", "stripe", "iyzico", "usdc"]}, "amount_micros": {"type": "integer", "description": "Whole cents (multiple of 10000), at most 10000000000"}}}}}}, "parameters": [{"name": "app_id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "external_ref", "in": "path", "required": true, "schema": {"type": "string", "maxLength": 128}}], "security": [{"customerSession": []}]}},
"/v1/customer/earnings": {"get": {"summary": "Captured revenue, margin and payouts for the signed-in tenant", "responses": {"200": {"description": "Earnings report"}}, "parameters": [{"name": "from", "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "to", "in": "query", "schema": {"type": "string", "format": "date"}}], "security": [{"customerSession": []}]}},
"/v1/control/payouts": {"get": {"summary": "Platform-wide split payouts and totals (operator)", "responses": {"200": {"description": "Payouts"}}, "parameters": [{"name": "pending", "in": "query", "schema": {"type": "boolean"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}]}},
"/v1/control/tenants/{tenant_id}/earnings": {"get": {"summary": "One tenant's captured revenue and payouts (operator)", "responses": {"200": {"description": "Earnings report"}}, "parameters": [{"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string"}}, {"name": "from", "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "to", "in": "query", "schema": {"type": "string", "format": "date"}}]}},
"/v1/wallets": {"post": {"summary": "Create (idempotently) the wallet of one of your users", "responses": {"200": {"description": "Wallet with live balance"}, "401": {"description": "Invalid key"}, "409": {"description": "End user exists without a wallet"}}, "security": [{"provisioningKey": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["external_ref"], "properties": {"external_ref": {"type": "string", "maxLength": 128}}}}}}}},
"/v1/wallets/{external_ref}": {"get": {"summary": "Wallet balance, held amount and today's spend", "responses": {"200": {"description": "Wallet"}, "404": {"description": "Unknown end user"}}, "security": [{"provisioningKey": []}], "parameters": [{"name": "external_ref", "in": "path", "required": true, "schema": {"type": "string", "maxLength": 128}}]}},
"/v1/wallets/{external_ref}/top-ups": {"post": {"summary": "Hosted top-up checkout into the wallet", "responses": {"200": {"description": "Checkout URL"}, "400": {"description": "Unknown provider or amount"}}, "security": [{"provisioningKey": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["provider", "amount_micros"], "properties": {"provider": {"type": "string", "enum": ["creem", "polar", "paypal", "stripe", "iyzico", "usdc"]}, "amount_micros": {"type": "integer", "description": "Whole cents (multiple of 10000), at most 10000000000"}}}}}}, "parameters": [{"name": "external_ref", "in": "path", "required": true, "schema": {"type": "string", "maxLength": 128}}]}}
},
"components": {
"securitySchemes": {"adminBearer": {"type": "http", "scheme": "bearer"}, "customerSession": {"type": "http", "scheme": "bearer", "description": "Expiring, revocable Vend customer session (not a provisioning key)"}, "provisioningKey": {"type": "http", "scheme": "bearer", "description": "Vend provisioning key (vk_live_ / vk_test_)"}},
"parameters": {
"TenantId": {"name": "tenant_id", "in": "path", "required": true, "schema": {"type": "string", "pattern": "^ten_[0-9A-HJKMNP-TV-Z]{26}$"}},
"AppId": {"name": "app_id", "in": "path", "required": true, "schema": {"type": "string", "pattern": "^app_[0-9A-HJKMNP-TV-Z]{26}$"}},
"TenantIdQuery": {"name": "tenant_id", "in": "query", "required": true, "schema": {"type": "string", "pattern": "^ten_[0-9A-HJKMNP-TV-Z]{26}$"}}
},
"responses": {"Unauthorized": {"description": "Missing, invalid, expired, or revoked bearer"}, "Forbidden": {"description": "Authenticated membership lacks the required role"}, "RateLimited": {"description": "Postgres-enforced distributed rate limit; Retry-After seconds and Cache-Control: no-store are returned", "headers": {"Retry-After": {"schema": {"type": "integer", "minimum": 1}}, "Cache-Control": {"schema": {"type": "string", "const": "no-store"}}}}},
"schemas": {
"MarkupPolicy": {"type": "object", "required": ["markup_bps", "min_fee_micros", "platform_fee_bps", "funding_mode"], "properties": {"markup_bps": {"type": "integer", "minimum": 0, "maximum": 10000}, "min_fee_micros": {"type": "integer", "minimum": 0}, "platform_fee_bps": {"type": "integer", "minimum": 0, "maximum": 10000}, "funding_mode": {"type": "string", "enum": ["tenant_reserve"]}}},
"BootstrapRequest": {"type": "object", "required": ["tenant_name", "owner_email", "owner_display_name", "app_name", "mint_account_id", "model_allowlist", "markup_policy", "daily_cap_micros"], "properties": {"tenant_name": {"type": "string", "minLength": 1}, "owner_email": {"type": "string", "format": "email"}, "owner_display_name": {"type": "string", "minLength": 1}, "app_name": {"type": "string", "minLength": 1}, "mint_account_id": {"type": "string", "minLength": 1}, "model_allowlist": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}, "zdr": {"type": "boolean", "default": false}, "markup_policy": {"$ref": "#/components/schemas/MarkupPolicy"}, "environment": {"type": "string", "enum": ["live", "test"], "default": "live"}, "daily_cap_micros": {"type": "integer", "minimum": 1}, "per_end_user_daily_cap_micros": {"type": ["integer", "null"], "minimum": 1}}},
"InviteUser": {"type": "object", "required": ["email", "display_name", "role"], "properties": {"email": {"type": "string", "format": "email"}, "display_name": {"type": "string", "minLength": 1}, "role": {"type": "string", "enum": ["owner", "admin", "viewer"]}}},
"CreateApp": {"type": "object", "required": ["name", "mint_account_id", "markup_policy"], "properties": {"name": {"type": "string", "minLength": 1}, "mint_account_id": {"type": "string", "minLength": 1}, "model_allowlist": {"type": "array", "items": {"type": "string"}, "default": []}, "zdr": {"type": "boolean", "default": false}, "markup_policy": {"$ref": "#/components/schemas/MarkupPolicy"}}},
"FundingCheckoutRequest": {"type": "object", "required": ["provider", "amount_micros"], "properties": {"provider": {"type": "string", "enum": ["stripe", "creem", "polar", "paypal", "usdc", "iyzico"]}, "amount_micros": {"type": "integer", "minimum": 10000, "multipleOf": 10000}}},
"IssueKey": {"type": "object", "required": ["daily_cap_micros"], "properties": {"environment": {"type": "string", "enum": ["live", "test"], "default": "live"}, "daily_cap_micros": {"type": "integer", "minimum": 1}, "per_end_user_daily_cap_micros": {"type": ["integer", "null"], "minimum": 1}}}
}
}
}