{"openapi":"3.1.0","info":{"title":"Cleura AI Inference API","description":"REST API for Cleura AI Inference","version":"0.22.4"},"paths":{"/admin/v1/tenants":{"get":{"tags":["Tenant routes"],"summary":"List all tenants","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tenant"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["Tenant routes"],"summary":"Create tenant","requestBody":{"description":"Mutable data for a tenant.\n\nThis struct contains the fields that can be modified after tenant creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantData"}}},"required":true},"responses":{"200":{"description":"Represents a tenant in the multi-tenant inference system.\n\nTenants are isolated organizational units that own providers, models,\nAPI keys, and licenses. Each tenant has its own namespace for resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull"]}]}},"/admin/v1/tenants/{tenant_id}":{"get":{"tags":["Tenant routes"],"summary":"Get a tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"Represents a tenant in the multi-tenant inference system.\n\nTenants are isolated organizational units that own providers, models,\nAPI keys, and licenses. Each tenant has its own namespace for resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["Tenant routes"],"summary":"Update a tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a tenant.\n\nThis struct contains the fields that can be modified after tenant creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantData"}}},"required":true},"responses":{"200":{"description":"Represents a tenant in the multi-tenant inference system.\n\nTenants are isolated organizational units that own providers, models,\nAPI keys, and licenses. Each tenant has its own namespace for resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Tenant routes"],"summary":"Delete a tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"Result of deleting a tenant and all its owned resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull"]}]}},"/admin/v1/tenants/{tenant_id}/notification-emails":{"get":{"tags":["TenantNotificationEmail routes"],"summary":"List notification email registrations for tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantNotificationEmail"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["TenantNotificationEmail routes"],"summary":"Register a notification email for tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a tenant notification email registration.\n\nContains the email address and the notification flags that control\nwhich events trigger delivery to this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantNotificationEmailData"}}},"required":true},"responses":{"200":{"description":"A tenant-owned email address registered to receive inference notifications.\n\nStores the email address together with a set of [`NotificationFlags`] that\ndetermine which events produce a delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantNotificationEmail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/tenants/{tenant_id}/notification-emails/{notification_email_id}":{"get":{"tags":["TenantNotificationEmail routes"],"summary":"Get a notification email registration","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"path","name":"notification_email_id","required":true,"schema":{"$ref":"#/components/schemas/TenantNotificationEmailId"},"style":"simple"}],"responses":{"200":{"description":"A tenant-owned email address registered to receive inference notifications.\n\nStores the email address together with a set of [`NotificationFlags`] that\ndetermine which events produce a delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantNotificationEmail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["TenantNotificationEmail routes"],"summary":"Update a notification email registration","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"path","name":"notification_email_id","required":true,"schema":{"$ref":"#/components/schemas/TenantNotificationEmailId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a tenant notification email registration.\n\nContains the email address and the notification flags that control\nwhich events trigger delivery to this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantNotificationEmailData"}}},"required":true},"responses":{"200":{"description":"A tenant-owned email address registered to receive inference notifications.\n\nStores the email address together with a set of [`NotificationFlags`] that\ndetermine which events produce a delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantNotificationEmail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["TenantNotificationEmail routes"],"summary":"Delete a notification email registration","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"path","name":"notification_email_id","required":true,"schema":{"$ref":"#/components/schemas/TenantNotificationEmailId"},"style":"simple"}],"responses":{"200":{"description":"A tenant-owned email address registered to receive inference notifications.\n\nStores the email address together with a set of [`NotificationFlags`] that\ndetermine which events produce a delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantNotificationEmail"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/tenants/{tenant_id}/webhooks":{"get":{"tags":["TenantWebhook routes"],"summary":"List webhook registrations for tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantWebhook"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["TenantWebhook routes"],"summary":"Register a webhook for tenant","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a tenant webhook registration.\n\nContains the HTTPS endpoint URL and the notification flags that control\nwhich events trigger a POST delivery to this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWebhookData"}}},"required":true},"responses":{"200":{"description":"A tenant-owned HTTP endpoint registered to receive inference event notifications.\n\nStores the webhook URL together with a set of [`NotificationFlags`] that\ndetermine which events produce a POST delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWebhook"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/tenants/{tenant_id}/webhooks/{webhook_id}":{"get":{"tags":["TenantWebhook routes"],"summary":"Get a webhook registration","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"path","name":"webhook_id","required":true,"schema":{"$ref":"#/components/schemas/TenantWebhookId"},"style":"simple"}],"responses":{"200":{"description":"A tenant-owned HTTP endpoint registered to receive inference event notifications.\n\nStores the webhook URL together with a set of [`NotificationFlags`] that\ndetermine which events produce a POST delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWebhook"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["TenantWebhook routes"],"summary":"Update a webhook registration","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"path","name":"webhook_id","required":true,"schema":{"$ref":"#/components/schemas/TenantWebhookId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a tenant webhook registration.\n\nContains the HTTPS endpoint URL and the notification flags that control\nwhich events trigger a POST delivery to this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWebhookData"}}},"required":true},"responses":{"200":{"description":"A tenant-owned HTTP endpoint registered to receive inference event notifications.\n\nStores the webhook URL together with a set of [`NotificationFlags`] that\ndetermine which events produce a POST delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWebhook"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["TenantWebhook routes"],"summary":"Delete a webhook registration","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"path","name":"webhook_id","required":true,"schema":{"$ref":"#/components/schemas/TenantWebhookId"},"style":"simple"}],"responses":{"200":{"description":"A tenant-owned HTTP endpoint registered to receive inference event notifications.\n\nStores the webhook URL together with a set of [`NotificationFlags`] that\ndetermine which events produce a POST delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantWebhook"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/tenants/{tenant_id}/notifications/stream":{"get":{"tags":["TenantNotificationStream routes"],"summary":"Subscribe to the tenant notification stream","parameters":[{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"An event that triggers notifications to subscribed email addresses and webhooks.\n\nEach variant corresponds to a [`NotificationFlags`] field. When dispatching,\nonly subscribers with the relevant flag set receive a notification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEvent"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/providers":{"get":{"tags":["Provider routes"],"summary":"List all providers related to tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRelatedProvider"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["Provider routes"],"summary":"Create provider","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"requestBody":{"description":"Provider data with access token included.\n\nUsed when returning provider data with credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDataWithAccessToken"}}},"required":true},"responses":{"200":{"description":"Provider with access token included.\n\nThis type is returned when creating or rotating a provider's access token,\nas the token is only available at those times.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWithAccessToken"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/providers/licensed":{"get":{"tags":["Provider routes"],"summary":"List licensed providers for tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicensedProvider"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/providers/owned":{"get":{"tags":["Provider routes"],"summary":"List providers owned by tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/providers/{provider_id}":{"get":{"tags":["Provider routes"],"summary":"Get a provider","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"responses":{"200":{"description":"A provider related to a tenant, either owned or licensed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRelatedProvider"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["Provider routes"],"summary":"Update a provider","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a provider.\n\nThis struct contains the fields that can be modified after provider creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderData"}}},"required":true},"responses":{"200":{"description":"Represents an AI provider in the inference system.\n\nProviders are external AI services (like OpenAI, Anthropic, or GpuStack)\nthat the inference service connects to for model inference. Each provider has\nconnection details and credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Provider"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Provider routes"],"summary":"Delete a provider","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"responses":{"200":{"description":"Result of soft-deleting a provider and its dependent models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/providers/{provider_id}/access-token":{"put":{"tags":["Provider routes"],"summary":"Update provider access token","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/providers/{provider_id}/available-gpus":{"get":{"tags":["Provider routes"],"summary":"List available GPUs on a provider","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailableGpu"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/providers/{provider_id}/models":{"get":{"tags":["Provider routes","Model routes"],"summary":"List all models related to provider (registered and unregistered)","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProviderRelatedModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["Provider routes","Model routes"],"summary":"Create model","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"},{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"requestBody":{"description":"Mutable data for a model.\n\nThis struct contains the fields that can be modified after model registration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelData"}}},"required":true},"responses":{"200":{"description":"Represents an AI model in the inference system.\n\nModels are specific AI models (like GPT-4, Claude 3, etc.) that are\nregistered from a provider. Each model has capabilities, status tracking,\nand can have multiple deployments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/providers/{provider_id}/models/registered":{"get":{"tags":["Provider routes","Model routes"],"summary":"List registered models for a provider","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/providers/{provider_id}/models/unregistered":{"get":{"tags":["Provider routes","Model routes"],"summary":"List unregistered models from a provider","parameters":[{"in":"path","name":"provider_id","required":true,"schema":{"$ref":"#/components/schemas/ProviderId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UnregisteredModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/models":{"get":{"tags":["Model routes"],"summary":"List all models related to tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRelatedModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/licensed":{"get":{"tags":["Model routes"],"summary":"List licensed models for tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicensedModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/owned":{"get":{"tags":["Model routes"],"summary":"List models owned by tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}":{"get":{"tags":["Model routes"],"summary":"Get a model","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"},{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"A model related to a tenant, either owned or licensed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRelatedModel"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"put":{"tags":["Model routes"],"summary":"Update a model","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"requestBody":{"description":"Mutable data for a model.\n\nThis struct contains the fields that can be modified after model registration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelData"}}},"required":true},"responses":{"200":{"description":"Represents an AI model in the inference system.\n\nModels are specific AI models (like GPT-4, Claude 3, etc.) that are\nregistered from a provider. Each model has capabilities, status tracking,\nand can have multiple deployments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Model routes"],"summary":"Delete a model","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Result of soft-deleting a model and its dependent resources.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/checks":{"post":{"tags":["Model routes"],"summary":"Run model health and capability checks","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Represents an AI model in the inference system.\n\nModels are specific AI models (like GPT-4, Claude 3, etc.) that are\nregistered from a provider. Each model has capabilities, status tracking,\nand can have multiple deployments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/deployment":{"get":{"tags":["Model routes","Deployment routes"],"summary":"Get model deployment","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Active or pending deployment of an AI model onto GPU-backed infrastructure.\n\nEach deployment binds a [`ModelId`] to a specific hardware and engine\nconfiguration described in [`DeploymentData`]. Deployments are soft-deletable\nand track creation, update, and deletion timestamps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"put":{"tags":["Model routes","Deployment routes"],"summary":"Update model deployment","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"requestBody":{"description":"Mutable configuration for a [`Deployment`], controlling hardware, scaling, and inference engine selection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentData"}}},"required":true},"responses":{"200":{"description":"Active or pending deployment of an AI model onto GPU-backed infrastructure.\n\nEach deployment binds a [`ModelId`] to a specific hardware and engine\nconfiguration described in [`DeploymentData`]. Deployments are soft-deletable\nand track creation, update, and deletion timestamps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"post":{"tags":["Model routes","Deployment routes"],"summary":"Create model deployment","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"requestBody":{"description":"Mutable configuration for a [`Deployment`], controlling hardware, scaling, and inference engine selection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentData"}}},"required":true},"responses":{"200":{"description":"Active or pending deployment of an AI model onto GPU-backed infrastructure.\n\nEach deployment binds a [`ModelId`] to a specific hardware and engine\nconfiguration described in [`DeploymentData`]. Deployments are soft-deletable\nand track creation, update, and deletion timestamps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Model routes","Deployment routes"],"summary":"Delete model deployment","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"DeploymentId\n(Uuid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentId"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/deployment/collect":{"post":{"tags":["Model routes","Deployment routes"],"summary":"Collect and register existing deployment from provider","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Active or pending deployment of an AI model onto GPU-backed infrastructure.\n\nEach deployment binds a [`ModelId`] to a specific hardware and engine\nconfiguration described in [`DeploymentData`]. Deployments are soft-deletable\nand track creation, update, and deletion timestamps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/deployment/events":{"get":{"tags":["Model routes","Deployment routes"],"summary":"List deployment events","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentEvent"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/deployment/usage":{"get":{"tags":["Model routes","Deployment routes"],"summary":"Get deployment usage","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Deployment resource usage tracking.\n\nThe hardware requirements of a model given its current configuration.\nUses deployment_id as the primary key since there's only one usage record per deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentUsage"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/aliases":{"get":{"tags":["Model routes","Alias routes"],"summary":"List model aliases","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/deprecation":{"get":{"tags":["ModelDeprecation routes"],"summary":"Get a model deprecation","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Planned deprecation of a model, optionally retargeting aliases to a target model.\n\nWhen a model owner wants to phase out a model, they create a deprecation\nspecifying an optional target model, a deadline (`deprecate_at`), and an\n`on_expire` action. Until the deadline, grantees may `accept` early to\nretarget their own aliases immediately. At the deadline, remaining aliases\nare retargeted (if a target is set) and `on_expire` is applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDeprecation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["ModelDeprecation routes"],"summary":"Update a model deprecation","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModelDeprecationBody"}}},"required":true},"responses":{"200":{"description":"Planned deprecation of a model, optionally retargeting aliases to a target model.\n\nWhen a model owner wants to phase out a model, they create a deprecation\nspecifying an optional target model, a deadline (`deprecate_at`), and an\n`on_expire` action. Until the deadline, grantees may `accept` early to\nretarget their own aliases immediately. At the deadline, remaining aliases\nare retargeted (if a target is set) and `on_expire` is applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDeprecation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"post":{"tags":["ModelDeprecation routes"],"summary":"Create a model deprecation","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModelDeprecationBody"}}},"required":true},"responses":{"200":{"description":"Planned deprecation of a model, optionally retargeting aliases to a target model.\n\nWhen a model owner wants to phase out a model, they create a deprecation\nspecifying an optional target model, a deadline (`deprecate_at`), and an\n`on_expire` action. Until the deadline, grantees may `accept` early to\nretarget their own aliases immediately. At the deadline, remaining aliases\nare retargeted (if a target is set) and `on_expire` is applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDeprecation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["ModelDeprecation routes"],"summary":"Cancel a model deprecation","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"}],"responses":{"200":{"description":"Result of cancelling (soft-deleting) a model deprecation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDeprecationDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/models/{model_id}/deprecation/accept":{"post":{"tags":["ModelDeprecation routes"],"summary":"Accept a model deprecation","parameters":[{"in":"path","name":"model_id","required":true,"schema":{"$ref":"#/components/schemas/ModelId"},"style":"simple"},{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/deployments":{"get":{"tags":["Deployment routes"],"summary":"List all deployments for tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"query","name":"include_deleted","schema":{"type":"boolean","default":false},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Deployment"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/deployments/{deployment_id}":{"get":{"tags":["Deployment routes"],"summary":"Get a deployment","parameters":[{"in":"path","name":"deployment_id","required":true,"schema":{"$ref":"#/components/schemas/DeploymentId"},"style":"simple"}],"responses":{"200":{"description":"Active or pending deployment of an AI model onto GPU-backed infrastructure.\n\nEach deployment binds a [`ModelId`] to a specific hardware and engine\nconfiguration described in [`DeploymentData`]. Deployments are soft-deletable\nand track creation, update, and deletion timestamps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Deployment routes"],"summary":"Delete a deployment","parameters":[{"in":"path","name":"deployment_id","required":true,"schema":{"$ref":"#/components/schemas/DeploymentId"},"style":"simple"}],"responses":{"200":{"description":"DeploymentId\n(Uuid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentId"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/deployments/{deployment_id}/events":{"get":{"tags":["Deployment routes"],"summary":"List deployment events","parameters":[{"in":"path","name":"deployment_id","required":true,"schema":{"$ref":"#/components/schemas/DeploymentId"},"style":"simple"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentEvent"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/deployments/{deployment_id}/usage":{"get":{"tags":["Deployment routes"],"summary":"Get deployment usage","parameters":[{"in":"path","name":"deployment_id","required":true,"schema":{"$ref":"#/components/schemas/DeploymentId"},"style":"simple"}],"responses":{"200":{"description":"Deployment resource usage tracking.\n\nThe hardware requirements of a model given its current configuration.\nUses deployment_id as the primary key since there's only one usage record per deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentUsage"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/deployments/{deployment_id}/container-logs":{"get":{"tags":["DeploymentLog routes"],"summary":"List deployment logs","parameters":[{"in":"path","name":"deployment_id","required":true,"schema":{"$ref":"#/components/schemas/DeploymentId"},"style":"simple"},{"in":"query","name":"limit","schema":{"type":"integer","format":"uint32","minimum":0},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint32","minimum":0},"style":"form"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentLogEntry"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/aliases":{"get":{"tags":["Alias routes"],"summary":"List all aliases for tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AliasAndModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"post":{"tags":["Alias routes"],"summary":"Create alias","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"requestBody":{"description":"Mutable fields of a model alias, used for creation and update requests.\n\nContains the target [`ModelId`] and the human-readable name that API clients\nuse to reference the model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasData"}}},"required":true},"responses":{"200":{"description":"Model alias entity.\n\nAssociates a user-friendly name with a model ID, allowing\nAPI clients to reference models by memorable names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasAndModel"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/aliases/{alias_id}":{"get":{"tags":["Alias routes"],"summary":"Get an alias","parameters":[{"in":"path","name":"alias_id","required":true,"schema":{"$ref":"#/components/schemas/AliasId"},"style":"simple"}],"responses":{"200":{"description":"Model alias entity.\n\nAssociates a user-friendly name with a model ID, allowing\nAPI clients to reference models by memorable names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasAndModel"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"put":{"tags":["Alias routes"],"summary":"Update an alias","parameters":[{"in":"path","name":"alias_id","required":true,"schema":{"$ref":"#/components/schemas/AliasId"},"style":"simple"}],"requestBody":{"description":"Mutable fields of a model alias, used for creation and update requests.\n\nContains the target [`ModelId`] and the human-readable name that API clients\nuse to reference the model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasData"}}},"required":true},"responses":{"200":{"description":"Model alias entity.\n\nAssociates a user-friendly name with a model ID, allowing\nAPI clients to reference models by memorable names.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasAndModel"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Alias routes"],"summary":"Delete an alias","parameters":[{"in":"path","name":"alias_id","required":true,"schema":{"$ref":"#/components/schemas/AliasId"},"style":"simple"}],"responses":{"200":{"description":"AliasId\n(Uuid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasId"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/licenses":{"get":{"tags":["License routes"],"summary":"List all licenses related to tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRelatedLicense"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["License routes"],"summary":"Create license","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"requestBody":{"description":"Mutable configuration for a [`License`].\n\nContains the human-readable name, per-model token and request quotas, and\nper-provider infrastructure limits that can be updated after license creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseData"}}},"required":true},"responses":{"200":{"description":"Resource-usage license assigned to a [`Tenant`](crate::models::tenant::Tenant).\n\nA license bundles per-model token quotas and per-provider infrastructure limits\ninto a single grantable unit. Tenants consume resources only up to the ceilings\ndefined by their active licenses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/licenses/owned":{"get":{"tags":["License routes"],"summary":"List licenses owned by tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OwnedLicense"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/granted":{"get":{"tags":["License routes"],"summary":"List licenses granted to tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantedLicense"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/{license_id}":{"get":{"tags":["License routes"],"summary":"Get a license","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"A license owned by the querying tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedLicense"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["License routes"],"summary":"Update a license","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"requestBody":{"description":"Mutable configuration for a [`License`].\n\nContains the human-readable name, per-model token and request quotas, and\nper-provider infrastructure limits that can be updated after license creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseData"}}},"required":true},"responses":{"200":{"description":"Resource-usage license assigned to a [`Tenant`](crate::models::tenant::Tenant).\n\nA license bundles per-model token quotas and per-provider infrastructure limits\ninto a single grantable unit. Tenants consume resources only up to the ceilings\ndefined by their active licenses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/License"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["License routes"],"summary":"Delete a license","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"Result of deleting a license and its grants.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/licenses/{license_id}/usage":{"get":{"tags":["License routes","LicenseGrant routes"],"summary":"Collect usage for all license grantees","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"}],"responses":{"200":{"description":"Represents the usage summary, price and cost for all license grantees during a given window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseUsage"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/{license_id}/usage/{tenant_id}":{"get":{"tags":["License routes","LicenseGrant routes"],"summary":"Collect usage statistics for a specific license grantee","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"},{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"}],"responses":{"200":{"description":"Represents the usage summary, price and cost for a license grantee during a given window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranteeLicenseUsage"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/{license_id}/grants":{"get":{"tags":["License routes","LicenseGrant routes"],"summary":"List license grants","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicenseGrant"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/{license_id}/grants/{tenant_id}":{"post":{"tags":["License routes","LicenseGrant routes"],"summary":"Create license grant","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"},{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"Cross-tenant grant that allows one tenant to consume resources under another tenant's [`License`].\n\nCreated when a license owner shares access with a different tenant,\nand soft-deleted when that access is revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseGrant"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["License routes","LicenseGrant routes"],"summary":"Delete license grant","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"},{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"Result of deleting a single license grant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseGrantDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/licenses/{license_id}/subscriptions":{"get":{"tags":["License routes","Subscription routes"],"summary":"List subscriptions to a license","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"post":{"tags":["License routes","Subscription routes"],"summary":"Create a subscription to a license","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionBody"}}},"required":true},"responses":{"200":{"description":"A tenant's subscription to a granted license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/licenses/{license_id}/cost-projection":{"get":{"tags":["License routes","LicenseGrant routes"],"summary":"Get projected monthly base-price cost for all license grantees","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"Projected monthly base-price cost for all grantees of a license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseCostProjection"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/{license_id}/cost-projection/{tenant_id}":{"get":{"tags":["License routes","LicenseGrant routes"],"summary":"Get projected monthly base-price cost for a specific license grantee","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"},{"in":"path","name":"tenant_id","required":true,"schema":{"$ref":"#/components/schemas/TenantId"},"style":"simple"}],"responses":{"200":{"description":"Projected monthly base-price cost for a single grantee of a license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GranteeLicenseCostProjection"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/licenses/{license_id}/deprecation":{"get":{"tags":["LicenseDeprecation routes"],"summary":"Get a license deprecation","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"Planned deprecation of a license, optionally migrating grantees to a target license.\n\nWhen a license owner wants to phase out a license, they create a deprecation\nspecifying an optional target license and a deadline (`deprecate_at`).\nIf a target is provided, grantees who accept are transferred immediately;\nthose who do not are force-transferred at the deadline. If no target is\nprovided, all grants are simply revoked and the source license is\nsoft-deleted at the deadline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseDeprecation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]},"put":{"tags":["LicenseDeprecation routes"],"summary":"Update a license deprecation","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLicenseDeprecationBody"}}},"required":true},"responses":{"200":{"description":"Planned deprecation of a license, optionally migrating grantees to a target license.\n\nWhen a license owner wants to phase out a license, they create a deprecation\nspecifying an optional target license and a deadline (`deprecate_at`).\nIf a target is provided, grantees who accept are transferred immediately;\nthose who do not are force-transferred at the deadline. If no target is\nprovided, all grants are simply revoked and the source license is\nsoft-deleted at the deadline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseDeprecation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"post":{"tags":["LicenseDeprecation routes"],"summary":"Create a license deprecation","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLicenseDeprecationBody"}}},"required":true},"responses":{"200":{"description":"Planned deprecation of a license, optionally migrating grantees to a target license.\n\nWhen a license owner wants to phase out a license, they create a deprecation\nspecifying an optional target license and a deadline (`deprecate_at`).\nIf a target is provided, grantees who accept are transferred immediately;\nthose who do not are force-transferred at the deadline. If no target is\nprovided, all grants are simply revoked and the source license is\nsoft-deleted at the deadline.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseDeprecation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["LicenseDeprecation routes"],"summary":"Cancel a license deprecation","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"}],"responses":{"200":{"description":"Result of cancelling (soft-deleting) a license deprecation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseDeprecationDeletion"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/licenses/{license_id}/deprecation/accept":{"post":{"tags":["LicenseDeprecation routes"],"summary":"Accept a license deprecation","parameters":[{"in":"path","name":"license_id","required":true,"schema":{"$ref":"#/components/schemas/LicenseId"},"style":"simple"},{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"Cross-tenant grant that allows one tenant to consume resources under another tenant's [`License`].\n\nCreated when a license owner shares access with a different tenant,\nand soft-deleted when that access is revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseGrant"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys":{"get":{"tags":["ApiKey routes"],"summary":"List all API keys for tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"post":{"tags":["ApiKey routes"],"summary":"Create API key","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"}],"requestBody":{"description":"Mutable data for an API key.\n\nThis struct contains the fields that can be modified after API key creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyData"}}},"required":true},"responses":{"200":{"description":"API key with its access token.\n\nThis type is returned when creating or rotating an API key, as the\naccess token is only available at creation/rotation time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithAccessToken"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys/{api_key_id}":{"get":{"tags":["ApiKey routes"],"summary":"Get an API key","parameters":[{"in":"path","name":"api_key_id","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"},"style":"simple"}],"responses":{"200":{"description":"Represents an API key in the inference system.\n\nAPI keys are used to authenticate requests and contain authorization\ninformation including role, allowed models/aliases, IP restrictions,\nand expiration settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"put":{"tags":["ApiKey routes"],"summary":"Update an API key","parameters":[{"in":"path","name":"api_key_id","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"},"style":"simple"}],"requestBody":{"description":"Mutable data for an API key.\n\nThis struct contains the fields that can be modified after API key creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyData"}}},"required":true},"responses":{"200":{"description":"Represents an API key in the inference system.\n\nAPI keys are used to authenticate requests and contain authorization\ninformation including role, allowed models/aliases, IP restrictions,\nand expiration settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["ApiKey routes"],"summary":"Delete an API key","parameters":[{"in":"path","name":"api_key_id","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"},"style":"simple"}],"responses":{"200":{"description":"ApiKeyId\n(Uuid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyId"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys/current":{"get":{"tags":["ApiKey routes"],"summary":"Get the current API key","responses":{"200":{"description":"Represents an API key in the inference system.\n\nAPI keys are used to authenticate requests and contain authorization\ninformation including role, allowed models/aliases, IP restrictions,\nand expiration settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"put":{"tags":["ApiKey routes"],"summary":"Update the current API key","requestBody":{"description":"Mutable data for an API key.\n\nThis struct contains the fields that can be modified after API key creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyData"}}},"required":true},"responses":{"200":{"description":"Represents an API key in the inference system.\n\nAPI keys are used to authenticate requests and contain authorization\ninformation including role, allowed models/aliases, IP restrictions,\nand expiration settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["ApiKey routes"],"summary":"Delete the current API key","responses":{"200":{"description":"ApiKeyId\n(Uuid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyId"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys/{api_key_id}/accessible-models":{"get":{"tags":["ApiKey routes"],"summary":"Get a list of models accessible using this API key, either directly or through an alias","parameters":[{"in":"path","name":"api_key_id","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyAccessibleModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys/current/accessible-models":{"get":{"tags":["ApiKey routes"],"summary":"Get a list of models accessible using this API key, either directly or through an alias","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyAccessibleModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys/{api_key_id}/access-token":{"put":{"tags":["ApiKey routes"],"summary":"Update API key access token","parameters":[{"in":"path","name":"api_key_id","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"},"style":"simple"}],"responses":{"200":{"description":"API key with its access token.\n\nThis type is returned when creating or rotating an API key, as the\naccess token is only available at creation/rotation time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithAccessToken"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/api-keys/current/access-token":{"put":{"tags":["ApiKey routes"],"summary":"Update API key access token","responses":{"200":{"description":"API key with its access token.\n\nThis type is returned when creating or rotating an API key, as the\naccess token is only available at creation/rotation time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithAccessToken"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/subscriptions":{"get":{"tags":["Subscription routes"],"summary":"List a tenant's subscriptions across granted licenses","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"query","name":"license_id","schema":{"$ref":"#/components/schemas/LicenseId"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/subscriptions/{subscription_id}":{"delete":{"tags":["Subscription routes"],"summary":"Delete a subscription","parameters":[{"in":"path","name":"subscription_id","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionId"},"style":"simple"}],"responses":{"200":{"description":"A tenant's subscription to a granted license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/subscriptions/{subscription_id}/cancel":{"post":{"tags":["Subscription routes"],"summary":"Request cancellation of a subscription","parameters":[{"in":"path","name":"subscription_id","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionId"},"style":"simple"}],"responses":{"200":{"description":"A tenant's subscription to a granted license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Subscription routes"],"summary":"Revoke a pending subscription cancellation","parameters":[{"in":"path","name":"subscription_id","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionId"},"style":"simple"}],"responses":{"200":{"description":"A tenant's subscription to a granted license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/subscriptions/multiple":{"delete":{"tags":["Subscription routes"],"summary":"Delete several subscriptions","requestBody":{"description":"Subscriptions to act on, all or nothing: distinct ids of subscriptions that\nbelong to one license and one tenant, all written with the same timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionIds"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/subscriptions/multiple/cancel":{"post":{"tags":["Subscription routes"],"summary":"Request cancellation of several subscriptions","requestBody":{"description":"Subscriptions to act on, all or nothing: distinct ids of subscriptions that\nbelong to one license and one tenant, all written with the same timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionIds"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]},"delete":{"tags":["Subscription routes"],"summary":"Revoke the pending cancellation of several subscriptions","requestBody":{"description":"Subscriptions to act on, all or nothing: distinct ids of subscriptions that\nbelong to one license and one tenant, all written with the same timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionIds"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["SystemAdminFull","TenantAdminFull"]}]}},"/admin/v1/requests":{"get":{"tags":["Request routes"],"summary":"List all requests for tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"api_key_id","description":"List only requests authenticated by this API key.","schema":{"description":"List only requests authenticated by this API key.","$ref":"#/components/schemas/ApiKeyId"},"style":"form"},{"in":"query","name":"model_id","description":"List only requests targeting this model.","schema":{"description":"List only requests targeting this model.","$ref":"#/components/schemas/ModelId"},"style":"form"},{"in":"query","name":"model_type","description":"List only requests targeting a model of this type.","schema":{"description":"List only requests targeting a model of this type.","$ref":"#/components/schemas/ModelTypeName"},"style":"form"},{"in":"query","name":"status","description":"List only requests that reached this stage of their lifecycle.","schema":{"description":"List only requests that reached this stage of their lifecycle.","$ref":"#/components/schemas/RequestStatus"},"style":"form"},{"in":"query","name":"limit","schema":{"type":"integer","format":"uint32","minimum":0,"default":100},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint32","minimum":0,"default":0},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Request"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/requests/by/{aggregation}":{"get":{"tags":["Request routes"],"summary":"Aggregate a tenant's requests grouped by time","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"path","name":"aggregation","required":true,"schema":{"$ref":"#/components/schemas/Aggregation"},"style":"simple"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time","default":null},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time","default":null},"style":"form"},{"in":"query","name":"api_key_id","schema":{"default":null,"$ref":"#/components/schemas/ApiKeyId"},"style":"form"},{"in":"query","name":"license_id","schema":{"default":null,"$ref":"#/components/schemas/LicenseId"},"style":"form"},{"in":"query","name":"model_id","schema":{"default":null,"$ref":"#/components/schemas/ModelId"},"style":"form"},{"in":"query","name":"priority_gte","schema":{"default":null,"$ref":"#/components/schemas/QueuePriority"},"style":"form"}],"responses":{"200":{"description":"A tenant's requests rolled up into time windows at a given [`Aggregation`] granularity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAggregation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/requests/costs/by/{aggregation}":{"get":{"tags":["Request routes"],"summary":"Per-window cost of a tenant's requests for chart plotting","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"path","name":"aggregation","required":true,"schema":{"$ref":"#/components/schemas/Aggregation"},"style":"simple"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time","default":null},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time","default":null},"style":"form"},{"in":"query","name":"api_key_id","schema":{"default":null,"$ref":"#/components/schemas/ApiKeyId"},"style":"form"},{"in":"query","name":"license_id","schema":{"default":null,"$ref":"#/components/schemas/LicenseId"},"style":"form"},{"in":"query","name":"model_id","schema":{"default":null,"$ref":"#/components/schemas/ModelId"},"style":"form"},{"in":"query","name":"priority_gte","schema":{"default":null,"$ref":"#/components/schemas/QueuePriority"},"style":"form"}],"responses":{"200":{"description":"Per-window cost totals for plotting spend alongside the usage chart.\n\nEach window carries a [`PriceTable`] summing every currency the tenant incurred cost in.\nWindows with no licensed requests are absent from the map rather than present with a zero.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCostAggregation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/requests/by-model":{"get":{"tags":["Request routes"],"summary":"Aggregate a tenant's requests grouped by model","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"}],"responses":{"200":{"description":"A tenant's requests rolled up per model (not time-windowed), within a time range.\n\nEach entry reuses [`RequestAggregationWindow`] to carry the terminal-status counts and\ntiming for one model. Used to surface per-model request volume and success rate without\nfetching the full request list. Pending requests are excluded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestModelAggregation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/requests/by-api-key":{"get":{"tags":["Request routes"],"summary":"Aggregate a tenant's requests grouped by API key","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"}],"responses":{"200":{"description":"A tenant's requests rolled up per API key (not time-windowed), within a time range.\n\nMirrors [`RequestModelAggregation`] but keyed by [`ApiKeyId`]. Requests not attributed to\nan API key (internally-initiated calls) and pending requests are excluded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestApiKeyAggregation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/requests/concurrency/{aggregation}":{"get":{"tags":["Request routes"],"summary":"Peak concurrent requests per time window for a tenant","parameters":[{"in":"query","name":"tenant_id","schema":{"$ref":"#/components/schemas/TenantId"},"style":"form"},{"in":"path","name":"aggregation","required":true,"schema":{"$ref":"#/components/schemas/Aggregation"},"style":"simple"},{"in":"query","name":"datetime_gte","description":"Start of the range, inclusive.","required":true,"schema":{"description":"Start of the range, inclusive.","type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","description":"End of the range, exclusive.","required":true,"schema":{"description":"End of the range, exclusive.","type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"api_key_id","description":"Count only requests authenticated by this API key.","schema":{"description":"Count only requests authenticated by this API key.","default":null,"$ref":"#/components/schemas/ApiKeyId"},"style":"form"},{"in":"query","name":"license_id","description":"Count only requests charged to this license.","schema":{"description":"Count only requests charged to this license.","default":null,"$ref":"#/components/schemas/LicenseId"},"style":"form"},{"in":"query","name":"model_id","description":"Count only requests targeting this model.","schema":{"description":"Count only requests targeting this model.","default":null,"$ref":"#/components/schemas/ModelId"},"style":"form"},{"in":"query","name":"priority_gte","description":"Count only requests whose effective priority was at least this value.","schema":{"description":"Count only requests whose effective priority was at least this value.","default":null,"$ref":"#/components/schemas/QueuePriority"},"style":"form"}],"responses":{"200":{"description":"How many of a tenant's requests were in flight at once, per time window.\n\nUnlike the other aggregations here, this is not a total: a window's value is the *highest*\nnumber of requests that overlapped at any instant within it. A mean would flatten exactly the\nbursts that matter, since the question this answers is whether a tenant is pressing against a\nconcurrency cap.\n\nA request is counted from `requested` until it finishes, and one still running is counted up\nto the moment the series was computed. Windows in which nothing started or finished still\ncarry the level they inherited, so a single long request registers across every window it\nspans rather than only the two it touches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcurrencyAggregation"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/requests/{request_id}":{"get":{"tags":["Request routes"],"summary":"Get a request","parameters":[{"in":"path","name":"request_id","required":true,"schema":{"$ref":"#/components/schemas/RequestId"},"style":"simple"}],"responses":{"200":{"description":"Single inference request routed through AI Inference.\n\nCaptures the full lifecycle of an inference call—from creation through\ncompletion, abort, or error—along with the tenant, model, and billing\ncontext (API key, license) associated with the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull","SystemAdminRead","TenantAdminFull","TenantAdminRead"]}]}},"/admin/v1/audit-logs":{"get":{"tags":["AuditLog routes"],"summary":"List all audit logs","parameters":[{"in":"query","name":"datetime_gte","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"datetime_lt","schema":{"type":"string","format":"date-time"},"style":"form"},{"in":"query","name":"limit","schema":{"type":"integer","format":"uint32","minimum":0,"default":100},"style":"form"},{"in":"query","name":"offset","schema":{"type":"integer","format":"uint32","minimum":0,"default":0},"style":"form"},{"in":"query","name":"action","description":"Filter by action name (e.g., \"List\", \"Create\", \"Get\", \"Update\", \"Delete\", \"Proxy\", \"Auth\", \"InferenceRequest\").","schema":{"description":"Filter by action name (e.g., \"List\", \"Create\", \"Get\", \"Update\", \"Delete\", \"Proxy\", \"Auth\", \"InferenceRequest\").","type":"string","default":null},"style":"form"},{"in":"query","name":"target","description":"Filter by target name (e.g., \"Tenant\", \"Model\", \"ApiKey\").","schema":{"description":"Filter by target name (e.g., \"Tenant\", \"Model\", \"ApiKey\").","type":"string","default":null},"style":"form"},{"in":"query","name":"result","description":"Filter by result (e.g., \"Ok\", \"Error\", \"Unauthorized\", \"Unauthenticated\").","schema":{"description":"Filter by result (e.g., \"Ok\", \"Error\", \"Unauthorized\", \"Unauthenticated\").","type":"string","default":null},"style":"form"},{"in":"query","name":"api_key_id","description":"Filter by the API key the caller authenticated with.","schema":{"description":"Filter by the API key the caller authenticated with.","default":null,"$ref":"#/components/schemas/ApiKeyId"},"style":"form"},{"in":"query","name":"ip","description":"Filter by caller IP: a single address (e.g., \"203.0.113.7\") or a CIDR range\n(e.g., \"203.0.113.0/24\").","schema":{"description":"Filter by caller IP: a single address (e.g., \"203.0.113.7\") or a CIDR range\n(e.g., \"203.0.113.0/24\").","$ref":"#/components/schemas/IpFilter"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull"]}]}},"/admin/v1/audit-logs/{audit_log_id}":{"get":{"tags":["AuditLog routes"],"summary":"Get an audit log","parameters":[{"in":"path","name":"audit_log_id","required":true,"schema":{"$ref":"#/components/schemas/AuditLogId"},"style":"simple"}],"responses":{"200":{"description":"Immutable audit trail entry capturing a single system action or access attempt.\n\nEach entry records who performed the action ([`Credentials`] inside [`AuditLogResult`]),\nwhat was done ([`Action`]), and whether it succeeded ([`AuditLogResult`]).\nEntries are append-only and never updated after creation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLog"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["SystemAdminFull"]}]}},"/auth/v1/oidc/enabled":{"get":{"tags":["Auth routes"],"summary":"Check if OIDC authentication is available","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcEnabledResponse"}}}}}}},"/auth/v1/user":{"get":{"tags":["Auth routes"],"summary":"Get the current user info","responses":{"200":{"description":"User role for role-based access control.\n\nRoles are hierarchical:\n- System admins (Full/Read) have access to all tenants\n- Tenant admins (Full/Read) have access to specific tenant\n- Tenant users have read-only access to specific tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantAdminRead"]}]}},"/auth/v1/token-exchange":{"post":{"tags":["Auth routes"],"summary":"Exchange a token for a secure cookie","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExchangeRequest"}}},"required":true},"responses":{"400":{"description":"Failed to parse the request body as JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected request with `Content-Type: application/json`","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"HttpBearer":["TenantAdminRead"]}]}},"/auth/v1/token-refresh":{"post":{"tags":["Auth routes"],"summary":"Refresh a token","security":[{"HttpBearer":["TenantAdminRead"]}]}},"/auth/v1/logout":{"post":{"tags":["Auth routes"],"summary":"Revoke session","security":[{"HttpBearer":["TenantAdminRead"]}]}},"/huggingface/v1/models":{"get":{"tags":["HuggingFace proxy routes"],"summary":"","parameters":[{"in":"query","name":"filter","description":"Filters can be set multiple times and as comma separated values or any combination thereof","schema":{"description":"Filters can be set multiple times and as comma separated values or any combination thereof","type":"array","items":{"type":"string"},"default":[]},"style":"form"},{"in":"query","name":"skip","schema":{"type":"integer","format":"uint32","minimum":0},"style":"form"},{"in":"query","name":"limit","schema":{"type":"integer","format":"uint32","minimum":0},"style":"form"},{"in":"query","name":"search","schema":{"type":"string"},"style":"form"},{"in":"query","name":"huggingface_api_key","schema":{"type":"string"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HuggingFaceModel"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantAdminFull"]}]}},"/huggingface/v1/licenses":{"get":{"tags":["HuggingFace proxy routes"],"summary":"","parameters":[{"in":"query","name":"huggingface_api_key","schema":{"type":"string"},"style":"form"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantAdminFull"]}]}},"/huggingface/v1/repo_gguf_files/{repo_id}":{"get":{"tags":["HuggingFace proxy routes"],"summary":"","parameters":[{"in":"query","name":"huggingface_api_key","schema":{"type":"string"},"style":"form"},{"in":"path","name":"repo_id","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantAdminFull"]}]}},"/huggingface/v1/repo_files/{repo_id}":{"get":{"tags":["HuggingFace proxy routes"],"summary":"","parameters":[{"in":"query","name":"huggingface_api_key","schema":{"type":"string"},"style":"form"},{"in":"path","name":"repo_id","required":true,"schema":{"type":"string"},"style":"simple"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantAdminFull"]}]}},"/v1/models":{"get":{"tags":["OpenAI-compatible inference routes"],"summary":"List models accessible using this api key in Open AI API format","responses":{"200":{"description":"Paginated list response from the `GET /models` endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiModelList"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/v1/chat/completions":{"post":{"tags":["OpenAI-compatible inference routes"],"summary":"Proxy chat completion request to upstream provider","requestBody":{"description":"Chat completion request body sent to `POST /chat/completions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Complete non-streaming response from `POST /chat/completions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiChatCompletionResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/v1/completions":{"post":{"tags":["OpenAI-compatible inference routes"],"summary":"Proxy completion request to upstream provider","requestBody":{"description":"Legacy completion request body sent to `POST /completions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Complete non-streaming response from `POST /completions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiCompletionResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/v1/embeddings":{"post":{"tags":["OpenAI-compatible inference routes"],"summary":"Proxy embedding request to upstream provider","requestBody":{"description":"Embedding request body sent to `POST /embeddings`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiEmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Complete response from `POST /embeddings`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiEmbeddingResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/v1/messages":{"post":{"tags":["Anthropic-compatible inference routes"],"summary":"Proxy an Anthropic Messages request to upstream provider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequestBody"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponseBody"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/v1/responses":{"post":{"tags":["OpenAI-compatible inference routes"],"summary":"Proxy an OpenAI Responses request to upstream provider","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequestBody"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBody"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/v1/audio/transcriptions":{"post":{"tags":["OpenAI-compatible inference routes"],"summary":"Proxy audio transcription request to upstream provider","requestBody":{"description":"multipart form data","content":{"multipart/form-data":{"schema":{"type":"array"}}},"required":true},"responses":{"200":{"description":"Complete non-streaming response from `POST /audio/transcriptions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAiAudioTranscriptionResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"HttpBearer":["TenantUser"]}]}},"/openapi.json":{"get":{"tags":["Documentation routes"],"summary":"Open API specification file","responses":{"200":{"description":"","content":{"application/json":{"schema":true}}}}}},"/swagger":{"get":{"tags":["Documentation routes"],"summary":"Interactive API documentation generated using Swagger","responses":{"200":{"description":"HTML content","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/scalar":{"get":{"tags":["Documentation routes"],"summary":"Interactive API documentation generated using Scalar","responses":{"200":{"description":"HTML content","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/redoc":{"get":{"tags":["Documentation routes"],"summary":"Interactive API documentation generated using Redoc","responses":{"200":{"description":"HTML content","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"securitySchemes":{"HttpBearer":{"type":"http","scheme":"bearer"}},"schemas":{"Tenant":{"description":"Represents a tenant in the multi-tenant inference system.\n\nTenants are isolated organizational units that own providers, models,\nAPI keys, and licenses. Each tenant has its own namespace for resources.","type":"object","properties":{"id":{"description":"Unique identifier for the tenant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable display name for the tenant.\n\nUsed in user interfaces and administrative tools.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"max_cost":{"description":"Optional self-imposed cost quota. The base price of any license does not count toward this.","anyOf":[{"$ref":"#/components/schemas/SelfCostQuota"},{"type":"null"}],"default":null},"created":{"description":"Timestamp when the tenant was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the tenant was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["id","display_name","created"]},"TenantId":{"description":"TenantId\n(Uuid)","type":"string","format":"uuid"},"DisplayName":{"type":"string","minLength":1,"maxLength":255},"SelfCostQuota":{"description":"A self-imposed cost quota set by a tenant on themselves or their API keys.\n\nThe base price from a license does NOT count towards this quota.","type":"object","properties":{"price":{"description":"The maximum allowed cost.","allOf":[{"$ref":"#/components/schemas/Price"}]},"per":{"description":"The time period the cost limit applies to (e.g. Month means \"max X SEK per month\").","allOf":[{"$ref":"#/components/schemas/Aggregation"}]}},"required":["price","per"]},"Price":{"description":"A monetary value in exactly one currency.\n\nStores the amount as a [`Decimal`] for exact arithmetic without\nfloating-point precision loss.\n\nThe following value represents `0.0006 SEK`:\n```rust\n# use cleura_ai_gateway_store::models::price::*;\n# use rust_decimal_macros::dec;\n# assert_eq!(Price::new(Currency::Sek, dec!(0.0006)).to_string(), \"0.0006 SEK\");\n```\n\nIts JSON representation is a map with a single entry:\n```json\n{ \"SEK\": \"0.0006\" }\n```","allOf":[{"$ref":"#/components/schemas/CurrencyDecimalSingleKVMap"}]},"CurrencyDecimalSingleKVMap":{"type":"object","propertyNames":{"$ref":"#/components/schemas/Currency"},"additionalProperties":{"type":["string","number"],"pattern":"^-?\\d+(\\.\\d+)?([eE]\\d+)?$"},"minProperties":1,"maxProperties":1},"Currency":{"description":"Supported currencies for pricing, serialized as ISO-4217 codes.","oneOf":[{"description":"Swedish Krona; the default billing currency for Cleura-hosted tenants.","type":"string","const":"SEK"},{"description":"Euro; used for tenants billed in the Eurozone.","type":"string","const":"EUR"},{"description":"US Dollar; used for tenants billed in USD.","type":"string","const":"USD"}]},"Aggregation":{"description":"Time period for aggregating usage metrics.\n\nUsed in licenses to define usage limits (e.g., 1000 tokens per minute)\nand in analytics for grouping request/token counts by time period.","oneOf":[{"description":"One-second rollup window; suited for real-time rate limiting such as max requests per second.","type":"string","const":"Second"},{"description":"One-minute rollup window; the most common granularity for token-per-minute rate limits.","type":"string","const":"Minute"},{"description":"One-hour rollup window; useful for sustained-throughput caps and hourly billing snapshots.","type":"string","const":"Hour"},{"description":"Calendar-day rollup window; used for daily usage quotas and end-of-day billing summaries.","type":"string","const":"Day"},{"description":"Calendar-month rollup window; typical for subscription-tier usage caps and monthly invoicing.","type":"string","const":"Month"},{"description":"Calendar-year rollup window; used for annual budget enforcement and yearly usage reports.","type":"string","const":"Year"}]},"TenantData":{"description":"Mutable data for a tenant.\n\nThis struct contains the fields that can be modified after tenant creation.","type":"object","properties":{"display_name":{"description":"Human-readable display name for the tenant.\n\nUsed in user interfaces and administrative tools.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"max_cost":{"description":"Optional self-imposed cost quota. The base price of any license does not count toward this.","anyOf":[{"$ref":"#/components/schemas/SelfCostQuota"},{"type":"null"}],"default":null}},"required":["display_name"]},"TenantIdPath":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["tenant_id"]},"TenantDeletion":{"description":"Result of deleting a tenant and all its owned resources.","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"},"providers":{"type":"array","items":{"$ref":"#/components/schemas/ProviderDeletion"}},"licenses":{"type":"array","items":{"$ref":"#/components/schemas/LicenseDeletion"}},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyId"}},"license_grants":{"type":"array","items":{"$ref":"#/components/schemas/LicenseId"}}},"required":["tenant_id","providers","licenses","api_keys","license_grants"]},"ProviderDeletion":{"description":"Result of soft-deleting a provider and its dependent models.","type":"object","properties":{"provider_id":{"$ref":"#/components/schemas/ProviderId"},"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelDeletion"}}},"required":["provider_id","models"]},"ProviderId":{"description":"ProviderId\n(Uuid)","type":"string","format":"uuid"},"ModelDeletion":{"description":"Result of soft-deleting a model and its dependent resources.","type":"object","properties":{"model_id":{"$ref":"#/components/schemas/ModelId"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/AliasId"}},"deployment":{"anyOf":[{"$ref":"#/components/schemas/DeploymentId"},{"type":"null"}]}},"required":["model_id","aliases"]},"ModelId":{"description":"ModelId\n(Uuid)","type":"string","format":"uuid"},"AliasId":{"description":"AliasId\n(Uuid)","type":"string","format":"uuid"},"DeploymentId":{"description":"DeploymentId\n(Uuid)","type":"string","format":"uuid"},"LicenseDeletion":{"description":"Result of deleting a license and its grants.","type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"},"grants":{"type":"array","items":{"$ref":"#/components/schemas/TenantId"}}},"required":["license_id","grants"]},"LicenseId":{"description":"LicenseId\n(Uuid)","type":"string","format":"uuid"},"ApiKeyId":{"description":"ApiKeyId\n(Uuid)","type":"string","format":"uuid"},"TenantIdPath2":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["tenant_id"]},"TenantNotificationEmail":{"description":"A tenant-owned email address registered to receive inference notifications.\n\nStores the email address together with a set of [`NotificationFlags`] that\ndetermine which events produce a delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","type":"object","properties":{"id":{"description":"Unique identifier for this notification email registration.","allOf":[{"$ref":"#/components/schemas/TenantNotificationEmailId"}]},"tenant_id":{"description":"Tenant that owns this notification email.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"email":{"description":"Destination email address for notifications.\n\nMust be a syntactically valid email address: non-empty local part,\nexactly one `@` separator, non-empty domain containing at least one\n`.`, and no whitespace. Validated at deserialization time so malformed\naddresses are rejected before reaching the database.","type":"string"},"near_quota_limit":{"description":"Send a notification when usage approaches the quota limit (typically ≥ 80 %).","type":"boolean","default":false},"quota_exceeded":{"description":"Send a notification when a quota limit is actually exceeded and a request is rejected.","type":"boolean","default":false},"near_spending_limit":{"description":"Send a notification when cumulative spending approaches the configured spending limit.","type":"boolean","default":false},"spending_limit_surpassed":{"description":"Send a notification when cumulative spending exceeds the configured spending limit.","type":"boolean","default":false},"license_pricing_updated":{"description":"Send a notification when the pricing terms of a license are updated.","type":"boolean","default":false},"license_models_updated":{"description":"Send a notification when the set of models covered by a license changes.","type":"boolean","default":false},"license_grant_offered":{"description":"Send a notification when a license is offered (granted) to this tenant.","type":"boolean","default":false},"license_grant_revoked":{"description":"Send a notification when a license grant previously held by this tenant is revoked.","type":"boolean","default":false},"subscription_created":{"description":"Send a notification when a grantee creates a subscription to a license this tenant owns.","type":"boolean","default":false},"subscription_cancelled":{"description":"Send a notification when a subscription to a license this tenant owns is cancelled.","type":"boolean","default":false},"subscription_cancellation_scheduled":{"description":"Send a notification when a grantee schedules a deferred cancellation of their subscription.","type":"boolean","default":false},"subscription_cancellation_revoked":{"description":"Send a notification when a pending subscription cancellation is revoked.","type":"boolean","default":false},"deployment_created":{"description":"Send a notification when a new model deployment is created and starting.","type":"boolean","default":false},"deployment_deleted":{"description":"Send a notification when a model deployment is deleted.","type":"boolean","default":false},"deployment_completed":{"description":"Send a notification when a model deployment finishes successfully and is ready.","type":"boolean","default":false},"deployment_failed":{"description":"Send a notification when a model deployment fails or is aborted.","type":"boolean","default":false},"model_created":{"description":"Send a notification when a model is registered.","type":"boolean","default":false},"model_updated":{"description":"Send a notification when a model's configuration is updated.","type":"boolean","default":false},"model_deleted":{"description":"Send a notification when a model is deleted.","type":"boolean","default":false},"api_key_created":{"description":"Send a notification when an API key is created for this tenant.","type":"boolean","default":false},"api_key_deleted":{"description":"Send a notification when an API key is deleted from this tenant.","type":"boolean","default":false},"model_deprecation_scheduled":{"description":"Send a notification when a model deprecation is scheduled (created).","type":"boolean","default":false},"model_deprecation_updated":{"description":"Send a notification when a model deprecation deadline or settings are updated.","type":"boolean","default":false},"model_deprecation_cancelled":{"description":"Send a notification when a model deprecation is cancelled before its deadline.","type":"boolean","default":false},"model_deprecation_expired":{"description":"Send a notification when a model deprecation deadline is reached and the action is applied.","type":"boolean","default":false},"license_deprecation_scheduled":{"description":"Send a notification when a license deprecation is scheduled (created).","type":"boolean","default":false},"license_deprecation_updated":{"description":"Send a notification when a license deprecation deadline or settings are updated.","type":"boolean","default":false},"license_deprecation_cancelled":{"description":"Send a notification when a license deprecation is cancelled before its deadline.","type":"boolean","default":false},"license_deprecation_expired":{"description":"Send a notification when a license deprecation deadline is reached and grants are migrated or revoked.","type":"boolean","default":false},"created":{"description":"Timestamp when this notification email was registered.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this notification email was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","email","created"]},"TenantNotificationEmailId":{"description":"TenantNotificationEmailId\n(Uuid)","type":"string","format":"uuid"},"TenantNotificationEmailData":{"description":"Mutable data for a tenant notification email registration.\n\nContains the email address and the notification flags that control\nwhich events trigger delivery to this address.","type":"object","properties":{"email":{"description":"Destination email address for notifications.\n\nMust be a syntactically valid email address: non-empty local part,\nexactly one `@` separator, non-empty domain containing at least one\n`.`, and no whitespace. Validated at deserialization time so malformed\naddresses are rejected before reaching the database.","type":"string"},"near_quota_limit":{"description":"Send a notification when usage approaches the quota limit (typically ≥ 80 %).","type":"boolean","default":false},"quota_exceeded":{"description":"Send a notification when a quota limit is actually exceeded and a request is rejected.","type":"boolean","default":false},"near_spending_limit":{"description":"Send a notification when cumulative spending approaches the configured spending limit.","type":"boolean","default":false},"spending_limit_surpassed":{"description":"Send a notification when cumulative spending exceeds the configured spending limit.","type":"boolean","default":false},"license_pricing_updated":{"description":"Send a notification when the pricing terms of a license are updated.","type":"boolean","default":false},"license_models_updated":{"description":"Send a notification when the set of models covered by a license changes.","type":"boolean","default":false},"license_grant_offered":{"description":"Send a notification when a license is offered (granted) to this tenant.","type":"boolean","default":false},"license_grant_revoked":{"description":"Send a notification when a license grant previously held by this tenant is revoked.","type":"boolean","default":false},"subscription_created":{"description":"Send a notification when a grantee creates a subscription to a license this tenant owns.","type":"boolean","default":false},"subscription_cancelled":{"description":"Send a notification when a subscription to a license this tenant owns is cancelled.","type":"boolean","default":false},"subscription_cancellation_scheduled":{"description":"Send a notification when a grantee schedules a deferred cancellation of their subscription.","type":"boolean","default":false},"subscription_cancellation_revoked":{"description":"Send a notification when a pending subscription cancellation is revoked.","type":"boolean","default":false},"deployment_created":{"description":"Send a notification when a new model deployment is created and starting.","type":"boolean","default":false},"deployment_deleted":{"description":"Send a notification when a model deployment is deleted.","type":"boolean","default":false},"deployment_completed":{"description":"Send a notification when a model deployment finishes successfully and is ready.","type":"boolean","default":false},"deployment_failed":{"description":"Send a notification when a model deployment fails or is aborted.","type":"boolean","default":false},"model_created":{"description":"Send a notification when a model is registered.","type":"boolean","default":false},"model_updated":{"description":"Send a notification when a model's configuration is updated.","type":"boolean","default":false},"model_deleted":{"description":"Send a notification when a model is deleted.","type":"boolean","default":false},"api_key_created":{"description":"Send a notification when an API key is created for this tenant.","type":"boolean","default":false},"api_key_deleted":{"description":"Send a notification when an API key is deleted from this tenant.","type":"boolean","default":false},"model_deprecation_scheduled":{"description":"Send a notification when a model deprecation is scheduled (created).","type":"boolean","default":false},"model_deprecation_updated":{"description":"Send a notification when a model deprecation deadline or settings are updated.","type":"boolean","default":false},"model_deprecation_cancelled":{"description":"Send a notification when a model deprecation is cancelled before its deadline.","type":"boolean","default":false},"model_deprecation_expired":{"description":"Send a notification when a model deprecation deadline is reached and the action is applied.","type":"boolean","default":false},"license_deprecation_scheduled":{"description":"Send a notification when a license deprecation is scheduled (created).","type":"boolean","default":false},"license_deprecation_updated":{"description":"Send a notification when a license deprecation deadline or settings are updated.","type":"boolean","default":false},"license_deprecation_cancelled":{"description":"Send a notification when a license deprecation is cancelled before its deadline.","type":"boolean","default":false},"license_deprecation_expired":{"description":"Send a notification when a license deprecation deadline is reached and grants are migrated or revoked.","type":"boolean","default":false}},"required":["email"]},"TenantNotificationEmailIdPath":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"},"notification_email_id":{"$ref":"#/components/schemas/TenantNotificationEmailId"}},"required":["tenant_id","notification_email_id"]},"TenantIdPath3":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["tenant_id"]},"TenantWebhook":{"description":"A tenant-owned HTTP endpoint registered to receive inference event notifications.\n\nStores the webhook URL together with a set of [`NotificationFlags`] that\ndetermine which events produce a POST delivery attempt. Supports soft deletion\nvia the `deleted` timestamp.","type":"object","properties":{"id":{"description":"Unique identifier for this webhook registration.","allOf":[{"$ref":"#/components/schemas/TenantWebhookId"}]},"tenant_id":{"description":"Tenant that owns this webhook.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"url":{"description":"Destination URL that receives POST notifications.\n\nMust be a valid HTTPS URL. HTTP and other schemes are rejected at\ndeserialization time to prevent accidental delivery of notification\npayloads over unencrypted connections.","type":"string","format":"uri"},"near_quota_limit":{"description":"Send a notification when usage approaches the quota limit (typically ≥ 80 %).","type":"boolean","default":false},"quota_exceeded":{"description":"Send a notification when a quota limit is actually exceeded and a request is rejected.","type":"boolean","default":false},"near_spending_limit":{"description":"Send a notification when cumulative spending approaches the configured spending limit.","type":"boolean","default":false},"spending_limit_surpassed":{"description":"Send a notification when cumulative spending exceeds the configured spending limit.","type":"boolean","default":false},"license_pricing_updated":{"description":"Send a notification when the pricing terms of a license are updated.","type":"boolean","default":false},"license_models_updated":{"description":"Send a notification when the set of models covered by a license changes.","type":"boolean","default":false},"license_grant_offered":{"description":"Send a notification when a license is offered (granted) to this tenant.","type":"boolean","default":false},"license_grant_revoked":{"description":"Send a notification when a license grant previously held by this tenant is revoked.","type":"boolean","default":false},"subscription_created":{"description":"Send a notification when a grantee creates a subscription to a license this tenant owns.","type":"boolean","default":false},"subscription_cancelled":{"description":"Send a notification when a subscription to a license this tenant owns is cancelled.","type":"boolean","default":false},"subscription_cancellation_scheduled":{"description":"Send a notification when a grantee schedules a deferred cancellation of their subscription.","type":"boolean","default":false},"subscription_cancellation_revoked":{"description":"Send a notification when a pending subscription cancellation is revoked.","type":"boolean","default":false},"deployment_created":{"description":"Send a notification when a new model deployment is created and starting.","type":"boolean","default":false},"deployment_deleted":{"description":"Send a notification when a model deployment is deleted.","type":"boolean","default":false},"deployment_completed":{"description":"Send a notification when a model deployment finishes successfully and is ready.","type":"boolean","default":false},"deployment_failed":{"description":"Send a notification when a model deployment fails or is aborted.","type":"boolean","default":false},"model_created":{"description":"Send a notification when a model is registered.","type":"boolean","default":false},"model_updated":{"description":"Send a notification when a model's configuration is updated.","type":"boolean","default":false},"model_deleted":{"description":"Send a notification when a model is deleted.","type":"boolean","default":false},"api_key_created":{"description":"Send a notification when an API key is created for this tenant.","type":"boolean","default":false},"api_key_deleted":{"description":"Send a notification when an API key is deleted from this tenant.","type":"boolean","default":false},"model_deprecation_scheduled":{"description":"Send a notification when a model deprecation is scheduled (created).","type":"boolean","default":false},"model_deprecation_updated":{"description":"Send a notification when a model deprecation deadline or settings are updated.","type":"boolean","default":false},"model_deprecation_cancelled":{"description":"Send a notification when a model deprecation is cancelled before its deadline.","type":"boolean","default":false},"model_deprecation_expired":{"description":"Send a notification when a model deprecation deadline is reached and the action is applied.","type":"boolean","default":false},"license_deprecation_scheduled":{"description":"Send a notification when a license deprecation is scheduled (created).","type":"boolean","default":false},"license_deprecation_updated":{"description":"Send a notification when a license deprecation deadline or settings are updated.","type":"boolean","default":false},"license_deprecation_cancelled":{"description":"Send a notification when a license deprecation is cancelled before its deadline.","type":"boolean","default":false},"license_deprecation_expired":{"description":"Send a notification when a license deprecation deadline is reached and grants are migrated or revoked.","type":"boolean","default":false},"created":{"description":"Timestamp when this webhook was registered.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this webhook was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","url","created"]},"TenantWebhookId":{"description":"TenantWebhookId\n(Uuid)","type":"string","format":"uuid"},"TenantWebhookData":{"description":"Mutable data for a tenant webhook registration.\n\nContains the HTTPS endpoint URL and the notification flags that control\nwhich events trigger a POST delivery to this endpoint.","type":"object","properties":{"url":{"description":"Destination URL that receives POST notifications.\n\nMust be a valid HTTPS URL. HTTP and other schemes are rejected at\ndeserialization time to prevent accidental delivery of notification\npayloads over unencrypted connections.","type":"string","format":"uri"},"near_quota_limit":{"description":"Send a notification when usage approaches the quota limit (typically ≥ 80 %).","type":"boolean","default":false},"quota_exceeded":{"description":"Send a notification when a quota limit is actually exceeded and a request is rejected.","type":"boolean","default":false},"near_spending_limit":{"description":"Send a notification when cumulative spending approaches the configured spending limit.","type":"boolean","default":false},"spending_limit_surpassed":{"description":"Send a notification when cumulative spending exceeds the configured spending limit.","type":"boolean","default":false},"license_pricing_updated":{"description":"Send a notification when the pricing terms of a license are updated.","type":"boolean","default":false},"license_models_updated":{"description":"Send a notification when the set of models covered by a license changes.","type":"boolean","default":false},"license_grant_offered":{"description":"Send a notification when a license is offered (granted) to this tenant.","type":"boolean","default":false},"license_grant_revoked":{"description":"Send a notification when a license grant previously held by this tenant is revoked.","type":"boolean","default":false},"subscription_created":{"description":"Send a notification when a grantee creates a subscription to a license this tenant owns.","type":"boolean","default":false},"subscription_cancelled":{"description":"Send a notification when a subscription to a license this tenant owns is cancelled.","type":"boolean","default":false},"subscription_cancellation_scheduled":{"description":"Send a notification when a grantee schedules a deferred cancellation of their subscription.","type":"boolean","default":false},"subscription_cancellation_revoked":{"description":"Send a notification when a pending subscription cancellation is revoked.","type":"boolean","default":false},"deployment_created":{"description":"Send a notification when a new model deployment is created and starting.","type":"boolean","default":false},"deployment_deleted":{"description":"Send a notification when a model deployment is deleted.","type":"boolean","default":false},"deployment_completed":{"description":"Send a notification when a model deployment finishes successfully and is ready.","type":"boolean","default":false},"deployment_failed":{"description":"Send a notification when a model deployment fails or is aborted.","type":"boolean","default":false},"model_created":{"description":"Send a notification when a model is registered.","type":"boolean","default":false},"model_updated":{"description":"Send a notification when a model's configuration is updated.","type":"boolean","default":false},"model_deleted":{"description":"Send a notification when a model is deleted.","type":"boolean","default":false},"api_key_created":{"description":"Send a notification when an API key is created for this tenant.","type":"boolean","default":false},"api_key_deleted":{"description":"Send a notification when an API key is deleted from this tenant.","type":"boolean","default":false},"model_deprecation_scheduled":{"description":"Send a notification when a model deprecation is scheduled (created).","type":"boolean","default":false},"model_deprecation_updated":{"description":"Send a notification when a model deprecation deadline or settings are updated.","type":"boolean","default":false},"model_deprecation_cancelled":{"description":"Send a notification when a model deprecation is cancelled before its deadline.","type":"boolean","default":false},"model_deprecation_expired":{"description":"Send a notification when a model deprecation deadline is reached and the action is applied.","type":"boolean","default":false},"license_deprecation_scheduled":{"description":"Send a notification when a license deprecation is scheduled (created).","type":"boolean","default":false},"license_deprecation_updated":{"description":"Send a notification when a license deprecation deadline or settings are updated.","type":"boolean","default":false},"license_deprecation_cancelled":{"description":"Send a notification when a license deprecation is cancelled before its deadline.","type":"boolean","default":false},"license_deprecation_expired":{"description":"Send a notification when a license deprecation deadline is reached and grants are migrated or revoked.","type":"boolean","default":false}},"required":["url"]},"TenantWebhookIdPath":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"},"webhook_id":{"$ref":"#/components/schemas/TenantWebhookId"}},"required":["tenant_id","webhook_id"]},"TenantIdPath4":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["tenant_id"]},"NotificationEvent":{"description":"An event that triggers notifications to subscribed email addresses and webhooks.\n\nEach variant corresponds to a [`NotificationFlags`] field. When dispatching,\nonly subscribers with the relevant flag set receive a notification.","oneOf":[{"description":"Usage has reached ≥ 80 % of a quota limit for a model covered by a license.","type":"object","properties":{"tenant_id":{"description":"Tenant whose quota usage triggered this notification.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model whose quota window is nearly exhausted.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"license_id":{"description":"License under which the quota applies.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"timestamp":{"description":"Timestamp when the event was detected.","type":"string","format":"date-time"},"event":{"type":"string","const":"near_quota_limit"}},"required":["event","tenant_id","model_id","license_id","timestamp"]},{"description":"A quota limit was exceeded and the triggering request was rejected.","type":"object","properties":{"tenant_id":{"description":"Tenant whose request was rate-limited.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model that was requested.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"license_id":{"description":"License under which the quota applies.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"timestamp":{"description":"Timestamp when the event was detected.","type":"string","format":"date-time"},"event":{"type":"string","const":"quota_exceeded"}},"required":["event","tenant_id","model_id","license_id","timestamp"]},{"description":"Cumulative spending has approached the configured spending limit.","type":"object","properties":{"tenant_id":{"description":"Tenant whose spending triggered this notification.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"api_key_id":{"description":"API key whose quota triggered this, if the breach is on an API key limit rather than the tenant limit.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}]},"current_spend":{"description":"Current spend in the quota window.","allOf":[{"$ref":"#/components/schemas/Price"}]},"limit":{"description":"The configured spending limit.","allOf":[{"$ref":"#/components/schemas/Price"}]},"timestamp":{"description":"Timestamp when the event was detected.","type":"string","format":"date-time"},"event":{"type":"string","const":"near_spending_limit"}},"required":["event","tenant_id","current_spend","limit","timestamp"]},{"description":"Cumulative spending has exceeded the configured spending limit.","type":"object","properties":{"tenant_id":{"description":"Tenant whose spending triggered this notification.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"api_key_id":{"description":"API key whose quota triggered this, if the breach is on an API key limit rather than the tenant limit.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}]},"current_spend":{"description":"Current spend in the quota window.","allOf":[{"$ref":"#/components/schemas/Price"}]},"limit":{"description":"The configured spending limit.","allOf":[{"$ref":"#/components/schemas/Price"}]},"timestamp":{"description":"Timestamp when the event was detected.","type":"string","format":"date-time"},"event":{"type":"string","const":"spending_limit_surpassed"}},"required":["event","tenant_id","current_spend","limit","timestamp"]},{"description":"The pricing terms of a license have been updated.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns or is granted the license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose pricing was updated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"timestamp":{"description":"Timestamp when the update occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_pricing_updated"}},"required":["event","tenant_id","license_id","timestamp"]},{"description":"The set of models covered by a license has changed.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns or is granted the license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose model list was updated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"timestamp":{"description":"Timestamp when the update occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_models_updated"}},"required":["event","tenant_id","license_id","timestamp"]},{"description":"A license has been offered (granted) to this tenant and is awaiting acceptance.","type":"object","properties":{"tenant_id":{"description":"Grantee tenant receiving the offer (notification target).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License being offered.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"licensor_tenant_id":{"description":"Tenant that owns the license and created the grant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"timestamp":{"description":"Timestamp when the grant was created.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_grant_offered"}},"required":["event","tenant_id","license_id","licensor_tenant_id","timestamp"]},{"description":"A license grant previously held by this tenant has been permanently revoked.","type":"object","properties":{"tenant_id":{"description":"Grantee tenant losing access (notification target).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose grant was deleted.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"licensor_tenant_id":{"description":"Tenant that revoked the grant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"timestamp":{"description":"Timestamp when the revocation occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_grant_revoked"}},"required":["event","tenant_id","license_id","licensor_tenant_id","timestamp"]},{"description":"A grantee created a subscription to a license this tenant owns.","type":"object","properties":{"tenant_id":{"description":"Licensor tenant that owns the license (notification target).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License subscribed to.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"grantee_tenant_id":{"description":"Tenant that created the subscription.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"timestamp":{"description":"Timestamp when the subscription was created.","type":"string","format":"date-time"},"count":{"description":"Number of subscriptions created by the request.","type":"integer","format":"uint32","minimum":0},"event":{"type":"string","const":"subscription_created"}},"required":["event","tenant_id","license_id","grantee_tenant_id","timestamp","count"]},{"description":"A subscription to a license this tenant owns was cancelled.","type":"object","properties":{"tenant_id":{"description":"Licensor tenant that owns the license (notification target).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose subscription was cancelled.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"grantee_tenant_id":{"description":"Tenant whose subscription was cancelled.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"timestamp":{"description":"Timestamp when the cancellation took effect.","type":"string","format":"date-time"},"count":{"description":"Number of subscriptions cancelled.","type":"integer","format":"uint32","minimum":0},"event":{"type":"string","const":"subscription_cancelled"}},"required":["event","tenant_id","license_id","grantee_tenant_id","timestamp","count"]},{"description":"A grantee scheduled a deferred cancellation of their subscription.","type":"object","properties":{"tenant_id":{"description":"Licensor tenant that owns the license (notification target).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose subscription cancellation was scheduled.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"grantee_tenant_id":{"description":"Tenant that scheduled the cancellation.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"timestamp":{"description":"Timestamp when the cancellation was scheduled.","type":"string","format":"date-time"},"count":{"description":"Number of subscriptions whose cancellation was scheduled.","type":"integer","format":"uint32","minimum":0},"event":{"type":"string","const":"subscription_cancellation_scheduled"}},"required":["event","tenant_id","license_id","grantee_tenant_id","timestamp","count"]},{"description":"A pending subscription cancellation was revoked.","type":"object","properties":{"tenant_id":{"description":"Licensor tenant that owns the license (notification target).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose pending cancellation was revoked.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"grantee_tenant_id":{"description":"Tenant whose cancellation was revoked.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"timestamp":{"description":"Timestamp when the revocation occurred.","type":"string","format":"date-time"},"count":{"description":"Number of subscriptions whose pending cancellation was revoked.","type":"integer","format":"uint32","minimum":0},"event":{"type":"string","const":"subscription_cancellation_revoked"}},"required":["event","tenant_id","license_id","grantee_tenant_id","timestamp","count"]},{"description":"A new model deployment has been created and is starting.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model being deployed.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"deployment_id":{"description":"Newly created deployment.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"timestamp":{"description":"Timestamp when the deployment was created.","type":"string","format":"date-time"},"event":{"type":"string","const":"deployment_created"}},"required":["event","tenant_id","model_id","deployment_id","timestamp"]},{"description":"A model deployment has been deleted.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model whose deployment was deleted.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"deployment_id":{"description":"Deployment that was deleted.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"timestamp":{"description":"Timestamp when the deployment was deleted.","type":"string","format":"date-time"},"event":{"type":"string","const":"deployment_deleted"}},"required":["event","tenant_id","model_id","deployment_id","timestamp"]},{"description":"A model deployment has finished successfully and is ready to serve requests.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model that was deployed.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"deployment_id":{"description":"Deployment that completed.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"timestamp":{"description":"Timestamp when the deployment completed.","type":"string","format":"date-time"},"event":{"type":"string","const":"deployment_completed"}},"required":["event","tenant_id","model_id","deployment_id","timestamp"]},{"description":"A model deployment has failed or been aborted.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model whose deployment failed.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"deployment_id":{"description":"Deployment that failed.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"error":{"description":"Human-readable description of the failure.","type":"string"},"timestamp":{"description":"Timestamp when the failure was detected.","type":"string","format":"date-time"},"event":{"type":"string","const":"deployment_failed"}},"required":["event","tenant_id","model_id","deployment_id","error","timestamp"]},{"description":"A new model was registered for this tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Newly created model.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"timestamp":{"description":"Timestamp when the model was created.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_created"}},"required":["event","tenant_id","model_id","timestamp"]},{"description":"A model's configuration was updated.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model that was updated.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"timestamp":{"description":"Timestamp when the update occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_updated"}},"required":["event","tenant_id","model_id","timestamp"]},{"description":"A model was deleted.","type":"object","properties":{"tenant_id":{"description":"Tenant that owned the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model that was deleted.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"timestamp":{"description":"Timestamp when the deletion occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_deleted"}},"required":["event","tenant_id","model_id","timestamp"]},{"description":"An API key was created for this tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the API key.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"api_key_id":{"description":"Newly created API key.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"timestamp":{"description":"Timestamp when the API key was created.","type":"string","format":"date-time"},"event":{"type":"string","const":"api_key_created"}},"required":["event","tenant_id","api_key_id","timestamp"]},{"description":"An API key was deleted from this tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that owned the API key.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"api_key_id":{"description":"API key that was deleted.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"timestamp":{"description":"Timestamp when the deletion occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"api_key_deleted"}},"required":["event","tenant_id","api_key_id","timestamp"]},{"description":"A model deprecation has been scheduled.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model scheduled for deprecation.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"deprecate_at":{"description":"When the model will be deprecated.","type":"string","format":"date-time"},"timestamp":{"description":"Timestamp when the deprecation was scheduled.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_deprecation_scheduled"}},"required":["event","tenant_id","model_id","deprecate_at","timestamp"]},{"description":"A model deprecation deadline or configuration has been updated.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model whose deprecation was updated.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"deprecate_at":{"description":"New deprecation deadline.","type":"string","format":"date-time"},"timestamp":{"description":"Timestamp when the update occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_deprecation_updated"}},"required":["event","tenant_id","model_id","deprecate_at","timestamp"]},{"description":"A scheduled model deprecation was cancelled.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model whose deprecation was cancelled.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"timestamp":{"description":"Timestamp when the cancellation occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_deprecation_cancelled"}},"required":["event","tenant_id","model_id","timestamp"]},{"description":"A model deprecation deadline has passed and the deprecation has been applied.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns the model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Model that was deprecated.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"timestamp":{"description":"Timestamp when the deprecation was processed.","type":"string","format":"date-time"},"event":{"type":"string","const":"model_deprecation_expired"}},"required":["event","tenant_id","model_id","timestamp"]},{"description":"A license deprecation has been scheduled.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns or is granted the license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License scheduled for deprecation.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"deprecate_at":{"description":"When the license will be deprecated.","type":"string","format":"date-time"},"timestamp":{"description":"Timestamp when the deprecation was scheduled.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_deprecation_scheduled"}},"required":["event","tenant_id","license_id","deprecate_at","timestamp"]},{"description":"A license deprecation deadline or configuration has been updated.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns or is granted the license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose deprecation was updated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"deprecate_at":{"description":"New deprecation deadline.","type":"string","format":"date-time"},"timestamp":{"description":"Timestamp when the update occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_deprecation_updated"}},"required":["event","tenant_id","license_id","deprecate_at","timestamp"]},{"description":"A scheduled license deprecation was cancelled.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns or is granted the license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License whose deprecation was cancelled.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"timestamp":{"description":"Timestamp when the cancellation occurred.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_deprecation_cancelled"}},"required":["event","tenant_id","license_id","timestamp"]},{"description":"A license deprecation deadline has passed and the deprecation has been applied.","type":"object","properties":{"tenant_id":{"description":"Tenant that owns or is granted the license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"license_id":{"description":"License that was deprecated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"timestamp":{"description":"Timestamp when the deprecation was processed.","type":"string","format":"date-time"},"event":{"type":"string","const":"license_deprecation_expired"}},"required":["event","tenant_id","license_id","timestamp"]}]},"OptionalTenantIdQuery":{"type":"object","properties":{"tenant_id":{"anyOf":[{"$ref":"#/components/schemas/TenantId"},{"type":"null"}]}}},"TenantRelatedProvider":{"description":"A provider related to a tenant, either owned or licensed.","oneOf":[{"type":"object","properties":{"relationship":{"type":"string","const":"Owner"}},"required":["relationship"],"allOf":[{"$ref":"#/components/schemas/Provider"}]},{"type":"object","properties":{"relationship":{"type":"string","const":"Licensee"}},"required":["relationship"],"allOf":[{"$ref":"#/components/schemas/LicensedProvider"}]}]},"PathPrefix":{"type":"string","minLength":0,"maxLength":1024},"Provider":{"description":"Represents an AI provider in the inference system.\n\nProviders are external AI services (like OpenAI, Anthropic, or GpuStack)\nthat the inference service connects to for model inference. Each provider has\nconnection details and credentials.","type":"object","properties":{"id":{"description":"Unique identifier for the provider.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"tenant_id":{"description":"The tenant that owns this provider configuration.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable display name for the provider.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"base_url":{"description":"Root URL of the provider's API endpoint, used as the base for all inference and management requests.","type":"string","format":"uri"},"created":{"description":"Timestamp when the provider was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the provider was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","display_name","base_url","created"],"oneOf":[{"description":"GpuStack v0.7.1–compatible backend with native model management and GPU scheduling APIs.","type":"object","properties":{"provider_type":{"type":"string","const":"GpuStack0_7_1"}},"required":["provider_type"]},{"description":"GpuStack v2.1–compatible backend with cluster-aware model management and GPU scheduling APIs.","type":"object","properties":{"cluster_id":{"description":"GpuStack cluster ID that this provider targets; used to scope all model operations to a specific cluster.","type":"integer","format":"int32"},"provider_type":{"type":"string","const":"GpuStack2_1"}},"required":["provider_type","cluster_id"]},{"description":"Generic OpenAI-compatible HTTP backend; use for any provider exposing the OpenAI chat/completions contract.","type":"object","properties":{"open_ai_paths_prefix":{"description":"Path prefix prepended to standard OpenAI routes (e.g. `\"/v1\"`), allowing non-standard base path layouts; defaults to an empty string.","default":"","allOf":[{"$ref":"#/components/schemas/PathPrefix"}]},"provider_type":{"type":"string","const":"OpenAiGeneric"}},"required":["provider_type"]},{"description":"Cleura AI Manager v1.0 backend; routes deployments and inference through the Manager/Worker orchestration layer.","type":"object","properties":{"provider_type":{"type":"string","const":"CleuraAiManager1_0"}},"required":["provider_type"]}]},"ProviderLicenseWithLicenseId":{"description":"A provider license paired with its license ID.","type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"},"max_deployment_count":{"description":"Maximum number of concurrent deployments allowed, or `None` for unlimited deployments.","type":["integer","null"],"format":"uint8","minimum":0,"maximum":255,"default":null},"max_ram_mb":{"description":"Maximum total RAM in megabytes allocatable across all deployments, or `None` for unlimited RAM.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"step_ram_mb":{"description":"RAM allocation granularity in megabytes; requests are rounded up to the nearest multiple, or `None` if any size is allowed.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"allow_cpu":{"description":"Whether CPU-only (no GPU) deployments are permitted under this license.","type":"boolean","default":false},"price_per_second_per_mb_of_ram":{"description":"Billable [`Price`] per second per megabyte of RAM consumed, or `None` if RAM usage is unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"gpus":{"description":"Per-GPU-type limits and pricing keyed by [`GpuType`]; absent GPU types are implicitly disallowed.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderGpuLicense"},"default":{}}},"required":["license_id"]},"ProviderGpuLicense":{"description":"Quota and pricing constraints for a single [`GpuType`] within a [`ProviderLicense`].\n\nGoverns how many GPUs and how much VRAM a tenant may allocate for a given GPU type,\nalong with the pricing model applied to that allocation.","type":"object","properties":{"max_gpu_count":{"description":"Maximum number of GPUs of this type that may be allocated concurrently, or `None` for unlimited.","type":["integer","null"],"format":"uint8","minimum":0,"maximum":255,"default":null},"max_vram_mb":{"description":"Maximum total VRAM in megabytes allocatable across all GPUs of this type, or `None` for unlimited.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"step_vram_mb":{"description":"VRAM allocation granularity in megabytes; requests are rounded up to the nearest multiple, or `None` if any size is allowed.","type":["integer","null"],"format":"uint32","minimum":0,"default":null}},"oneOf":[{"description":"No charge for VRAM; used when GPU access is included in a flat subscription or during trial periods.","type":"object","properties":{"price_type":{"type":"string","const":"None"}},"required":["price_type"]},{"description":"Constant per-second cost per megabyte of VRAM, regardless of total allocation size.","type":"object","properties":{"price_per_second_per_mb_of_vram":{"description":"Fixed [`Price`] charged per second for each megabyte of VRAM allocated.","allOf":[{"$ref":"#/components/schemas/Price"}]},"price_type":{"type":"string","const":"Flat"}},"required":["price_type","price_per_second_per_mb_of_vram"]},{"description":"Per-MB cost interpolates linearly between a base price (at zero VRAM) and a reference price (at `reference_vram_mb`); larger allocations saturate at the reference price.","type":"object","properties":{"base_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM when allocation approaches zero.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM at and above `reference_vram_mb`.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_vram_mb":{"description":"VRAM size in megabytes at which the per-MB rate reaches the reference price; allocations above this are capped at that rate.","type":"integer","format":"uint32","minimum":0},"price_type":{"type":"string","const":"Linear"}},"required":["price_type","base_price_per_second_per_mb_of_vram","reference_price_per_second_per_mb_of_vram","reference_vram_mb"]},{"description":"Per-MB cost interpolates logarithmically: the per-MB rate equals the base price at `reference_vram_mb / 10` (and below) and the reference price at `reference_vram_mb` (and above).","type":"object","properties":{"base_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM at and below `reference_vram_mb / 10`.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM at and above `reference_vram_mb`.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_vram_mb":{"description":"VRAM size in megabytes at which the per-MB rate reaches the reference price; allocations above this are capped at that rate.","type":"integer","format":"uint32","minimum":0},"price_type":{"type":"string","const":"Logarithmic"}},"required":["price_type","base_price_per_second_per_mb_of_vram","reference_price_per_second_per_mb_of_vram","reference_vram_mb"]}]},"LicensedProvider":{"description":"A provider accessed through a license.","type":"object","properties":{"license":{"$ref":"#/components/schemas/ProviderLicenseWithLicenseId"},"id":{"description":"Unique identifier for the provider.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"tenant_id":{"description":"The tenant that owns this provider configuration.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable display name for the provider.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"base_url":{"description":"Root URL of the provider's API endpoint, used as the base for all inference and management requests.","type":"string","format":"uri"},"created":{"description":"Timestamp when the provider was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the provider was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["license","id","tenant_id","display_name","base_url","created"],"oneOf":[{"description":"GpuStack v0.7.1–compatible backend with native model management and GPU scheduling APIs.","type":"object","properties":{"provider_type":{"type":"string","const":"GpuStack0_7_1"}},"required":["provider_type"]},{"description":"GpuStack v2.1–compatible backend with cluster-aware model management and GPU scheduling APIs.","type":"object","properties":{"cluster_id":{"description":"GpuStack cluster ID that this provider targets; used to scope all model operations to a specific cluster.","type":"integer","format":"int32"},"provider_type":{"type":"string","const":"GpuStack2_1"}},"required":["provider_type","cluster_id"]},{"description":"Generic OpenAI-compatible HTTP backend; use for any provider exposing the OpenAI chat/completions contract.","type":"object","properties":{"open_ai_paths_prefix":{"description":"Path prefix prepended to standard OpenAI routes (e.g. `\"/v1\"`), allowing non-standard base path layouts; defaults to an empty string.","default":"","allOf":[{"$ref":"#/components/schemas/PathPrefix"}]},"provider_type":{"type":"string","const":"OpenAiGeneric"}},"required":["provider_type"]},{"description":"Cleura AI Manager v1.0 backend; routes deployments and inference through the Manager/Worker orchestration layer.","type":"object","properties":{"provider_type":{"type":"string","const":"CleuraAiManager1_0"}},"required":["provider_type"]}]},"ProviderDataWithAccessToken":{"description":"Provider data with access token included.\n\nUsed when returning provider data with credentials.","type":"object","properties":{"display_name":{"description":"Human-readable display name for the provider.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"base_url":{"description":"Root URL of the provider's API endpoint, used as the base for all inference and management requests.","type":"string","format":"uri"},"access_token":{"description":"The secret access token for the provider API.","type":"string"}},"required":["display_name","base_url","access_token"],"oneOf":[{"description":"GpuStack v0.7.1–compatible backend with native model management and GPU scheduling APIs.","type":"object","properties":{"provider_type":{"type":"string","const":"GpuStack0_7_1"}},"required":["provider_type"]},{"description":"GpuStack v2.1–compatible backend with cluster-aware model management and GPU scheduling APIs.","type":"object","properties":{"cluster_id":{"description":"GpuStack cluster ID that this provider targets; used to scope all model operations to a specific cluster.","type":"integer","format":"int32"},"provider_type":{"type":"string","const":"GpuStack2_1"}},"required":["provider_type","cluster_id"]},{"description":"Generic OpenAI-compatible HTTP backend; use for any provider exposing the OpenAI chat/completions contract.","type":"object","properties":{"open_ai_paths_prefix":{"description":"Path prefix prepended to standard OpenAI routes (e.g. `\"/v1\"`), allowing non-standard base path layouts; defaults to an empty string.","default":"","allOf":[{"$ref":"#/components/schemas/PathPrefix"}]},"provider_type":{"type":"string","const":"OpenAiGeneric"}},"required":["provider_type"]},{"description":"Cleura AI Manager v1.0 backend; routes deployments and inference through the Manager/Worker orchestration layer.","type":"object","properties":{"provider_type":{"type":"string","const":"CleuraAiManager1_0"}},"required":["provider_type"]}]},"ProviderWithAccessToken":{"description":"Provider with access token included.\n\nThis type is returned when creating or rotating a provider's access token,\nas the token is only available at those times.","type":"object","properties":{"id":{"description":"Unique identifier for the provider.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"tenant_id":{"description":"The tenant that owns this provider configuration.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable display name for the provider.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"base_url":{"description":"Root URL of the provider's API endpoint, used as the base for all inference and management requests.","type":"string","format":"uri"},"created":{"description":"Timestamp when the provider was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the provider was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"},"access_token":{"description":"The secret access token for the provider API.\n\nThis token is encrypted at rest in the database.","type":"string"}},"required":["id","tenant_id","display_name","base_url","created","access_token"],"oneOf":[{"description":"GpuStack v0.7.1–compatible backend with native model management and GPU scheduling APIs.","type":"object","properties":{"provider_type":{"type":"string","const":"GpuStack0_7_1"}},"required":["provider_type"]},{"description":"GpuStack v2.1–compatible backend with cluster-aware model management and GPU scheduling APIs.","type":"object","properties":{"cluster_id":{"description":"GpuStack cluster ID that this provider targets; used to scope all model operations to a specific cluster.","type":"integer","format":"int32"},"provider_type":{"type":"string","const":"GpuStack2_1"}},"required":["provider_type","cluster_id"]},{"description":"Generic OpenAI-compatible HTTP backend; use for any provider exposing the OpenAI chat/completions contract.","type":"object","properties":{"open_ai_paths_prefix":{"description":"Path prefix prepended to standard OpenAI routes (e.g. `\"/v1\"`), allowing non-standard base path layouts; defaults to an empty string.","default":"","allOf":[{"$ref":"#/components/schemas/PathPrefix"}]},"provider_type":{"type":"string","const":"OpenAiGeneric"}},"required":["provider_type"]},{"description":"Cleura AI Manager v1.0 backend; routes deployments and inference through the Manager/Worker orchestration layer.","type":"object","properties":{"provider_type":{"type":"string","const":"CleuraAiManager1_0"}},"required":["provider_type"]}]},"ProviderIdPath":{"type":"object","properties":{"provider_id":{"$ref":"#/components/schemas/ProviderId"}},"required":["provider_id"]},"ProviderData":{"description":"Mutable data for a provider.\n\nThis struct contains the fields that can be modified after provider creation.","type":"object","properties":{"display_name":{"description":"Human-readable display name for the provider.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"base_url":{"description":"Root URL of the provider's API endpoint, used as the base for all inference and management requests.","type":"string","format":"uri"}},"required":["display_name","base_url"],"oneOf":[{"description":"GpuStack v0.7.1–compatible backend with native model management and GPU scheduling APIs.","type":"object","properties":{"provider_type":{"type":"string","const":"GpuStack0_7_1"}},"required":["provider_type"]},{"description":"GpuStack v2.1–compatible backend with cluster-aware model management and GPU scheduling APIs.","type":"object","properties":{"cluster_id":{"description":"GpuStack cluster ID that this provider targets; used to scope all model operations to a specific cluster.","type":"integer","format":"int32"},"provider_type":{"type":"string","const":"GpuStack2_1"}},"required":["provider_type","cluster_id"]},{"description":"Generic OpenAI-compatible HTTP backend; use for any provider exposing the OpenAI chat/completions contract.","type":"object","properties":{"open_ai_paths_prefix":{"description":"Path prefix prepended to standard OpenAI routes (e.g. `\"/v1\"`), allowing non-standard base path layouts; defaults to an empty string.","default":"","allOf":[{"$ref":"#/components/schemas/PathPrefix"}]},"provider_type":{"type":"string","const":"OpenAiGeneric"}},"required":["provider_type"]},{"description":"Cleura AI Manager v1.0 backend; routes deployments and inference through the Manager/Worker orchestration layer.","type":"object","properties":{"provider_type":{"type":"string","const":"CleuraAiManager1_0"}},"required":["provider_type"]}]},"AvailableGpu":{"description":"A GPU type available on a provider, discovered at runtime.","type":"object","properties":{"gpu_type":{"description":"Normalized GPU type identifier (e.g. \"NvidiaH100\").","allOf":[{"$ref":"#/components/schemas/GpuType"}]},"name":{"description":"Human-readable GPU name (e.g. \"NVIDIA H100 SXM\").","type":"string"},"vendor":{"description":"GPU vendor (e.g. \"NVIDIA\", \"AMD\").","type":"string"},"vram_mb":{"description":"VRAM capacity per physical GPU in megabytes.","type":"integer","format":"uint64","minimum":0},"count":{"description":"Total number of this GPU type across the provider.","type":"integer","format":"uint32","minimum":0},"available_vram_mb":{"description":"Total free VRAM in megabytes across all GPUs of this type.","type":"integer","format":"uint64","minimum":0}},"required":["gpu_type","name","vendor","vram_mb","count","available_vram_mb"]},"GpuType":{"description":"Identifier for a GPU hardware type (e.g. `\"NvidiaH100\"`, `\"NvidiaL4\"`).\n\nGPU types are reported by providers at runtime, not constrained to a fixed set.\nThe string value is used as-is for storage, display, and indexing.","type":"string"},"ProviderRelatedModel":{"oneOf":[{"type":"object","properties":{"registration":{"type":"string","const":"Registered"}},"required":["registration"],"allOf":[{"$ref":"#/components/schemas/Model"}]},{"type":"object","properties":{"registration":{"type":"string","const":"Unregistered"}},"required":["registration"],"allOf":[{"$ref":"#/components/schemas/UnregisteredModel"}]}]},"ModelStatus":{"description":"Operational status of a model.\n\nModels track their availability status which is updated separately\nfrom other model data (with its own timestamp).","oneOf":[{"description":"Status is unknown or not yet checked.","type":"object","properties":{"status":{"type":"string","const":"Unknown"}},"required":["status"]},{"description":"Check has been scheduled but has not yet completed; transitions to [`Ok`](ModelStatus::Ok) or [`Error`](ModelStatus::Error) once the check finishes.","type":"object","properties":{"status_updated":{"description":"Timestamp when the pending check was enqueued.","type":"string","format":"date-time"},"status":{"type":"string","const":"Pending"}},"required":["status","status_updated"]},{"description":"Model is operational and available.","type":"object","properties":{"status_updated":{"description":"When the status was last verified.","type":"string","format":"date-time"},"status":{"type":"string","const":"Ok"}},"required":["status","status_updated"]},{"description":"Model encountered an error and may be unavailable.","type":"object","properties":{"status_updated":{"description":"When the error status was detected.","type":"string","format":"date-time"},"status_error":{"description":"Description of the error.","type":"string"},"status":{"type":"string","const":"Error"}},"required":["status","status_updated","status_error"]}]},"ModelName":{"type":"string","minLength":1,"maxLength":255},"ProviderModelName":{"type":"string","minLength":1,"maxLength":255},"Description":{"type":"string","minLength":1,"maxLength":4096},"LicenseIdentifier":{"type":"string","minLength":1,"maxLength":255},"LinkUrl":{"type":"string","minLength":1,"maxLength":2048},"ModelInferenceOptions":{"description":"Inference-time options applied by the inference service when proxying requests to a model's provider.\n\nSeparate configuration can be provided for non-streaming and streaming chat\ncompletion requests, allowing different reasoning formats or default\nproperties depending on the request mode.","type":"object","properties":{"chat_completions":{"description":"Options applied to non-streaming chat completion requests.","anyOf":[{"$ref":"#/components/schemas/ModelInferenceChatCompletionOptions"},{"type":"null"}]},"streaming_chat_completions":{"description":"Options applied to streaming chat completion requests.","anyOf":[{"$ref":"#/components/schemas/ModelInferenceChatCompletionOptions"},{"type":"null"}]}}},"ModelInferenceChatCompletionOptions":{"description":"Per-request options for a single chat completion mode (streaming or non-streaming).","type":"object","properties":{"remap_reasoning":{"description":"When set, the inference service remaps reasoning content between the `from` and\n`to` positions on every response chunk (or full response).","anyOf":[{"$ref":"#/components/schemas/ModelInferenceChatCompletionReasoningRemapping"},{"type":"null"}]},"default_request_body_properties":{"description":"Key-value pairs merged into the request body before it is forwarded to\nthe provider. User-supplied properties take precedence over defaults.","type":["object","null"],"additionalProperties":true},"remap_reasoning_effort_to_thinking_token_budget":{"description":"Budgets in reasoning tokens sent as `thinking_token_budget` in place of\nthe caller's `reasoning_effort`.","anyOf":[{"$ref":"#/components/schemas/ModelInferenceChatCompletionReasoningEffortToThinkingTokenBudget"},{"type":"null"}]}}},"ModelInferenceChatCompletionReasoningRemapping":{"description":"Describes a reasoning remapping rule: extract reasoning from `from` and\nre-emit it at `to`.","type":"object","properties":{"from":{"description":"Where the provider emits reasoning content.","allOf":[{"$ref":"#/components/schemas/ModelInferenceChatCompletionReasoningRemappingPosition"}]},"to":{"description":"Where the inference service should place reasoning content in the response.","allOf":[{"$ref":"#/components/schemas/ModelInferenceChatCompletionReasoningRemappingPosition"}]}},"required":["from","to"]},"ModelInferenceChatCompletionReasoningRemappingPosition":{"description":"A location where reasoning content can appear in a chat completion response.","oneOf":[{"description":"Reasoning is embedded inline in the `content` field, wrapped between\n`start_tag` and `stop_tag` (e.g. `<think>…</think>`).","type":"object","properties":{"Content":{"type":"object","properties":{"start_tag":{"description":"Tag that marks the beginning of reasoning content.","allOf":[{"$ref":"#/components/schemas/ReasoningTag"}]},"stop_tag":{"description":"Tag that marks the end of reasoning content.","allOf":[{"$ref":"#/components/schemas/ReasoningTag"}]}},"required":["start_tag","stop_tag"]}},"required":["Content"],"additionalProperties":false},{"description":"Reasoning is in the dedicated `reasoning` field (vLLM convention).","type":"string","const":"Reasoning"},{"description":"Reasoning is in the dedicated `reasoning_content` field (LlamaCPP convention).","type":"string","const":"ReasoningContent"}]},"ReasoningTag":{"type":"string","minLength":1,"maxLength":255},"ModelInferenceChatCompletionReasoningEffortToThinkingTokenBudget":{"description":"Reasoning token budget to send as `thinking_token_budget` for each\n`reasoning_effort` level a caller can ask for.\n\nvLLM treats every `reasoning_effort` except `none` as \"reasoning on\", so the\nlevels are indistinguishable to a model served through it. `thinking_token_budget`\nis the control that does vary the amount, which is why the levels map onto it\nrather than being forwarded as they arrive. `0` disables reasoning and `-1`\nleaves it unbounded.\n\n# Choosing budgets\n\nvLLM enforces a budget by cutting the model off once it has spent that many\nreasoning tokens. A budget set too low therefore interrupts the model\nmid-thought and it answers from incomplete working — the response carries no\nerror and nothing distinguishes it from a complete one. How much reasoning a\nquestion needs depends on the question rather than the model, so there is no\nminimum that can be enforced here. Leave headroom and check the budgets\nagainst prompts representative of what the model will be asked.","type":"object","properties":{"none":{"description":"Budget sent when the caller asks for `none`.","type":["integer","null"],"format":"int32"},"low":{"description":"Budget sent when the caller asks for `low`.","type":["integer","null"],"format":"int32"},"medium":{"description":"Budget sent when the caller asks for `medium`.","type":["integer","null"],"format":"int32"},"high":{"description":"Budget sent when the caller asks for `high`.","type":["integer","null"],"format":"int32"}}},"Model":{"description":"Represents an AI model in the inference system.\n\nModels are specific AI models (like GPT-4, Claude 3, etc.) that are\nregistered from a provider. Each model has capabilities, status tracking,\nand can have multiple deployments.","type":"object","properties":{"id":{"description":"Unique identifier for the model.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"tenant_id":{"description":"The tenant that registered this model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"provider_id":{"description":"The provider that offers this model.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"health_check":{"description":"Current health-check status indicating whether the model's provider endpoint is reachable and responding.","allOf":[{"$ref":"#/components/schemas/ModelStatus"}]},"capability_check":{"description":"Current capability-check status indicating whether the model supports its declared capabilities (e.g., tool calling, vision).","allOf":[{"$ref":"#/components/schemas/ModelStatus"}]},"name":{"description":"Human-readable display name for the model.","allOf":[{"$ref":"#/components/schemas/ModelName"}]},"name_in_provider":{"description":"Name of the model as recognized by the provider.\n\nUsed when making API calls to the provider.","allOf":[{"$ref":"#/components/schemas/ProviderModelName"}]},"description":{"description":"Optional human-readable description of the model.","anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]},"license":{"description":"Optional license identifier for the model (e.g. \"Apache-2.0\", \"MIT\").","anyOf":[{"$ref":"#/components/schemas/LicenseIdentifier"},{"type":"null"}]},"link":{"description":"Optional URL linking to the model's homepage or repository.","anyOf":[{"$ref":"#/components/schemas/LinkUrl"},{"type":"null"}]},"inference_options":{"description":"Optional inference-time behaviour overrides for this model.\n\nWhen set, the inference service applies these options to chat completion requests\nbefore forwarding them to the provider. This includes injecting default\nrequest body properties and remapping reasoning content between formats.","anyOf":[{"$ref":"#/components/schemas/ModelInferenceOptions"},{"type":"null"}]},"context_length":{"description":"Maximum context length (in tokens) the model supports — the combined\ninput + output budget the runtime engine enforces (vLLM's\n`max_model_len`).\n\nResolved when the model is collected from its provider: the deployment's\nconfigured value if set, otherwise the value reported by the running\nengine. Used to trim an oversized `max_tokens` on incoming requests so\nthe engine doesn't reject them.","type":["integer","null"],"format":"uint32","minimum":0},"created":{"description":"Timestamp when the model was registered.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the model was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","provider_id","health_check","capability_check","name","name_in_provider","created"],"oneOf":[{"description":"Chat/completion model.","type":"object","properties":{"model_type":{"type":"string","const":"Chat"},"capabilities":{"type":"object","properties":{"reasoning":{"description":"Supports extended reasoning (like o1 models).","type":"boolean"},"tools":{"description":"Supports function/tool calling.","type":"boolean"},"vision":{"description":"Supports vision/image inputs.","type":"boolean"}},"required":["reasoning","tools","vision"]}},"required":["model_type","capabilities"]},{"description":"Text embedding model.","type":"object","properties":{"model_type":{"type":"string","const":"Embedding"},"capabilities":{"type":"object","properties":{"standard":{"description":"Supports standard embeddings.","type":"boolean"},"late":{"description":"Supports late interaction embeddings.","type":"boolean"},"vision":{"description":"Supports vision embeddings.","type":"boolean"}},"required":["standard","late","vision"]}},"required":["model_type","capabilities"]},{"description":"Re-ranking model.","type":"object","properties":{"model_type":{"type":"string","const":"Reranking"},"capabilities":{"type":"object","properties":{"vision":{"description":"Supports vision in reranking.","type":"boolean"}},"required":["vision"]}},"required":["model_type","capabilities"]},{"description":"Speech-to-text transcription model.","type":"object","properties":{"model_type":{"type":"string","const":"SpeechToText"}},"required":["model_type"]},{"description":"Text-to-speech synthesis model.","type":"object","properties":{"model_type":{"type":"string","const":"TextToSpeech"}},"required":["model_type"]},{"description":"Image generation model.","type":"object","properties":{"model_type":{"type":"string","const":"Image"}},"required":["model_type"]},{"description":"Unknown model type — the system will attempt to discover the actual type during health checks.","type":"object","properties":{"model_type":{"type":"string","const":"Unknown"}},"required":["model_type"]}]},"UnregisteredModel":{"type":"object","properties":{"name_in_provider":{"type":"string"},"provider_model_data":{"type":"object","additionalProperties":true}},"required":["name_in_provider","provider_model_data"]},"ModelData":{"description":"Mutable data for a model.\n\nThis struct contains the fields that can be modified after model registration.","type":"object","properties":{"name":{"description":"Human-readable display name for the model.","allOf":[{"$ref":"#/components/schemas/ModelName"}]},"name_in_provider":{"description":"Name of the model as recognized by the provider.\n\nUsed when making API calls to the provider.","allOf":[{"$ref":"#/components/schemas/ProviderModelName"}]},"description":{"description":"Optional human-readable description of the model.","anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]},"license":{"description":"Optional license identifier for the model (e.g. \"Apache-2.0\", \"MIT\").","anyOf":[{"$ref":"#/components/schemas/LicenseIdentifier"},{"type":"null"}]},"link":{"description":"Optional URL linking to the model's homepage or repository.","anyOf":[{"$ref":"#/components/schemas/LinkUrl"},{"type":"null"}]},"inference_options":{"description":"Optional inference-time behaviour overrides for this model.\n\nWhen set, the inference service applies these options to chat completion requests\nbefore forwarding them to the provider. This includes injecting default\nrequest body properties and remapping reasoning content between formats.","anyOf":[{"$ref":"#/components/schemas/ModelInferenceOptions"},{"type":"null"}]},"context_length":{"description":"Maximum context length (in tokens) the model supports — the combined\ninput + output budget the runtime engine enforces (vLLM's\n`max_model_len`).\n\nResolved when the model is collected from its provider: the deployment's\nconfigured value if set, otherwise the value reported by the running\nengine. Used to trim an oversized `max_tokens` on incoming requests so\nthe engine doesn't reject them.","type":["integer","null"],"format":"uint32","minimum":0}},"required":["name","name_in_provider"],"oneOf":[{"description":"Chat/completion model.","type":"object","properties":{"model_type":{"type":"string","const":"Chat"},"capabilities":{"type":"object","properties":{"reasoning":{"description":"Supports extended reasoning (like o1 models).","type":"boolean"},"tools":{"description":"Supports function/tool calling.","type":"boolean"},"vision":{"description":"Supports vision/image inputs.","type":"boolean"}},"required":["reasoning","tools","vision"]}},"required":["model_type","capabilities"]},{"description":"Text embedding model.","type":"object","properties":{"model_type":{"type":"string","const":"Embedding"},"capabilities":{"type":"object","properties":{"standard":{"description":"Supports standard embeddings.","type":"boolean"},"late":{"description":"Supports late interaction embeddings.","type":"boolean"},"vision":{"description":"Supports vision embeddings.","type":"boolean"}},"required":["standard","late","vision"]}},"required":["model_type","capabilities"]},{"description":"Re-ranking model.","type":"object","properties":{"model_type":{"type":"string","const":"Reranking"},"capabilities":{"type":"object","properties":{"vision":{"description":"Supports vision in reranking.","type":"boolean"}},"required":["vision"]}},"required":["model_type","capabilities"]},{"description":"Speech-to-text transcription model.","type":"object","properties":{"model_type":{"type":"string","const":"SpeechToText"}},"required":["model_type"]},{"description":"Text-to-speech synthesis model.","type":"object","properties":{"model_type":{"type":"string","const":"TextToSpeech"}},"required":["model_type"]},{"description":"Image generation model.","type":"object","properties":{"model_type":{"type":"string","const":"Image"}},"required":["model_type"]},{"description":"Unknown model type — the system will attempt to discover the actual type during health checks.","type":"object","properties":{"model_type":{"type":"string","const":"Unknown"}},"required":["model_type"]}]},"TenantRelatedModel":{"description":"A model related to a tenant, either owned or licensed.","oneOf":[{"type":"object","properties":{"relationship":{"type":"string","const":"Licensee"}},"required":["relationship"],"allOf":[{"$ref":"#/components/schemas/LicensedModel"}]},{"type":"object","properties":{"relationship":{"type":"string","const":"Owner"}},"required":["relationship"],"allOf":[{"$ref":"#/components/schemas/Model"}]}]},"ModelLicenseWithLicenseId":{"description":"A model license paired with its license ID.","type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"},"max_input_tokens":{"description":"Maximum input tokens allowed per [`Aggregation`] window; an empty map means no input-token limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"max_output_tokens":{"description":"Maximum output tokens allowed per [`Aggregation`] window; an empty map means no output-token limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"max_input_audio_seconds":{"description":"Maximum input audio seconds allowed per [`Aggregation`] window; an empty map means no audio-input limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"max_requests":{"description":"Maximum number of requests allowed per [`Aggregation`] window; an empty map means no request-rate limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"concurrent_limits":{"description":"Per-model concurrent limits (in-flight requests, TPS).","default":{"max_concurrent_requests":null,"max_concurrent_tps":null,"max_concurrent_input_tokens":null},"allOf":[{"$ref":"#/components/schemas/ConcurrentLimits"}]},"price_per_input_token":{"description":"Billable [`Price`] charged for each input token, or `None` if input tokens are unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_cached_input_token":{"description":"Billable [`Price`] charged for each input token the provider served from its prefix cache.\n\n`None` bills cached input tokens at `price_per_input_token`, so a license without a cached\nprice charges exactly what it would if no tokens were cached.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_output_token":{"description":"Billable [`Price`] charged for each output token, or `None` if output tokens are unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_input_audio_second":{"description":"Billable [`Price`] charged per second of input audio, or `None` if audio input is unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null}},"required":["license_id"]},"ConcurrentLimits":{"description":"Concurrent (real-time, no time window) limits applied to a license, model type, or model.\n\nUsed at three scopes — per-license, per-model-type, and per-model — with the\ntightest applicable limit being enforced.","type":"object","properties":{"max_concurrent_requests":{"description":"Maximum number of concurrent in-flight requests, or `None` for unlimited.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"max_concurrent_tps":{"description":"Maximum tokens per second across active streams, or `None` for unlimited.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"max_concurrent_input_tokens":{"description":"Maximum input tokens across in-flight requests at once, or `None` for unlimited.\n\nStands in for the key-value cache an engine holds per request, which grows with the context\nit is serving. Only the input is counted: how many tokens a request will generate is unknown\nwhen it is admitted, so the output is covered by admitting at a fraction of this ceiling\nrather than by guessing at a length.","type":["integer","null"],"format":"uint32","minimum":0,"default":null}}},"ModelDeprecation":{"description":"Planned deprecation of a model, optionally retargeting aliases to a target model.\n\nWhen a model owner wants to phase out a model, they create a deprecation\nspecifying an optional target model, a deadline (`deprecate_at`), and an\n`on_expire` action. Until the deadline, grantees may `accept` early to\nretarget their own aliases immediately. At the deadline, remaining aliases\nare retargeted (if a target is set) and `on_expire` is applied.","type":"object","properties":{"model_id":{"description":"Model being deprecated (serves as the primary key).","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target_model_id":{"description":"Optional replacement model that aliases referencing the source model will be retargeted to.","anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}]},"on_expire":{"description":"Action applied to the source model when the deadline expires.","allOf":[{"$ref":"#/components/schemas/ModelDeprecationOnExpire"}]},"description":{"description":"Human-readable description shown to grantees explaining the deprecation.","anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]},"deprecate_at":{"description":"Deadline at which remaining aliases are retargeted and `on_expire` is applied.","type":"string","format":"date-time"},"created":{"description":"Timestamp when this deprecation was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if never modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this deprecation was soft-deleted (cancelled or completed), or `None` if active.","type":["string","null"],"format":"date-time"}},"required":["model_id","on_expire","deprecate_at","created"]},"ModelDeprecationOnExpire":{"description":"Action to take on the deprecated model when the deadline expires.\n\nCan be changed via [`update_model_deprecation`](crate::AiGatewayModelDeprecationStore::update_model_deprecation)\n(unlike `target_model_id`, which is immutable after creation).","oneOf":[{"description":"Remove the model from every license that includes it but keep the model,\nits deployment, and any aliases alive (aliases are still retargeted if a\ntarget is provided).","type":"string","const":"RemoveFromLicenses"},{"description":"Soft-delete the model entirely; this cascades to decommission the\ndeployment, soft-delete any remaining aliases, and remove references\nto the model from all licenses.","type":"string","const":"DeleteCompletely"}]},"LicensedModel":{"description":"A model accessed through a license.","type":"object","properties":{"license":{"description":"Optional license identifier for the model (e.g. \"Apache-2.0\", \"MIT\").","anyOf":[{"$ref":"#/components/schemas/LicenseIdentifier"},{"type":"null"}]},"id":{"description":"Unique identifier for the model.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"tenant_id":{"description":"The tenant that registered this model.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"provider_id":{"description":"The provider that offers this model.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"health_check":{"description":"Current health-check status indicating whether the model's provider endpoint is reachable and responding.","allOf":[{"$ref":"#/components/schemas/ModelStatus"}]},"capability_check":{"description":"Current capability-check status indicating whether the model supports its declared capabilities (e.g., tool calling, vision).","allOf":[{"$ref":"#/components/schemas/ModelStatus"}]},"name":{"description":"Human-readable display name for the model.","allOf":[{"$ref":"#/components/schemas/ModelName"}]},"name_in_provider":{"description":"Name of the model as recognized by the provider.\n\nUsed when making API calls to the provider.","allOf":[{"$ref":"#/components/schemas/ProviderModelName"}]},"description":{"description":"Optional human-readable description of the model.","anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]},"link":{"description":"Optional URL linking to the model's homepage or repository.","anyOf":[{"$ref":"#/components/schemas/LinkUrl"},{"type":"null"}]},"inference_options":{"description":"Optional inference-time behaviour overrides for this model.\n\nWhen set, the inference service applies these options to chat completion requests\nbefore forwarding them to the provider. This includes injecting default\nrequest body properties and remapping reasoning content between formats.","anyOf":[{"$ref":"#/components/schemas/ModelInferenceOptions"},{"type":"null"}]},"context_length":{"description":"Maximum context length (in tokens) the model supports — the combined\ninput + output budget the runtime engine enforces (vLLM's\n`max_model_len`).\n\nResolved when the model is collected from its provider: the deployment's\nconfigured value if set, otherwise the value reported by the running\nengine. Used to trim an oversized `max_tokens` on incoming requests so\nthe engine doesn't reject them.","type":["integer","null"],"format":"uint32","minimum":0},"created":{"description":"Timestamp when the model was registered.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the model was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"},"deprecation":{"description":"Pending deprecation of this model, if any. Allows licensees to see and\naccept deprecations ahead of the deadline.","anyOf":[{"$ref":"#/components/schemas/ModelDeprecation"},{"type":"null"}]}},"required":["license","id","tenant_id","provider_id","health_check","capability_check","name","name_in_provider","created"],"oneOf":[{"description":"Chat/completion model.","type":"object","properties":{"model_type":{"type":"string","const":"Chat"},"capabilities":{"type":"object","properties":{"reasoning":{"description":"Supports extended reasoning (like o1 models).","type":"boolean"},"tools":{"description":"Supports function/tool calling.","type":"boolean"},"vision":{"description":"Supports vision/image inputs.","type":"boolean"}},"required":["reasoning","tools","vision"]}},"required":["model_type","capabilities"]},{"description":"Text embedding model.","type":"object","properties":{"model_type":{"type":"string","const":"Embedding"},"capabilities":{"type":"object","properties":{"standard":{"description":"Supports standard embeddings.","type":"boolean"},"late":{"description":"Supports late interaction embeddings.","type":"boolean"},"vision":{"description":"Supports vision embeddings.","type":"boolean"}},"required":["standard","late","vision"]}},"required":["model_type","capabilities"]},{"description":"Re-ranking model.","type":"object","properties":{"model_type":{"type":"string","const":"Reranking"},"capabilities":{"type":"object","properties":{"vision":{"description":"Supports vision in reranking.","type":"boolean"}},"required":["vision"]}},"required":["model_type","capabilities"]},{"description":"Speech-to-text transcription model.","type":"object","properties":{"model_type":{"type":"string","const":"SpeechToText"}},"required":["model_type"]},{"description":"Text-to-speech synthesis model.","type":"object","properties":{"model_type":{"type":"string","const":"TextToSpeech"}},"required":["model_type"]},{"description":"Image generation model.","type":"object","properties":{"model_type":{"type":"string","const":"Image"}},"required":["model_type"]},{"description":"Unknown model type — the system will attempt to discover the actual type during health checks.","type":"object","properties":{"model_type":{"type":"string","const":"Unknown"}},"required":["model_type"]}]},"ModelIdPath":{"type":"object","properties":{"model_id":{"$ref":"#/components/schemas/ModelId"}},"required":["model_id"]},"Deployment":{"description":"Active or pending deployment of an AI model onto GPU-backed infrastructure.\n\nEach deployment binds a [`ModelId`] to a specific hardware and engine\nconfiguration described in [`DeploymentData`]. Deployments are soft-deletable\nand track creation, update, and deletion timestamps.","type":"object","properties":{"id":{"description":"Unique identifier for this deployment.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"model_id":{"description":"Reference to the [`ModelId`] being deployed.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"gpu_type":{"description":"The type of Gpu that the model should run on","allOf":[{"$ref":"#/components/schemas/GpuType"}]},"allow_cpu":{"description":"Wether or not to allow Cpu-offloading","type":"boolean"},"instances":{"description":"The requested instance count. Requests will be distributed Round Robin.","type":"integer","format":"uint8","minimum":1,"maximum":255},"parallel":{"description":"The amount of parallel requests each instance should try to handle at once. Further requests will be queued.","type":"integer","format":"uint32","minimum":1},"status":{"description":"Current lifecycle status, derived from the latest stored event at read time.","default":{"status":"Queued"},"allOf":[{"$ref":"#/components/schemas/DeploymentStatus"}]},"created":{"description":"Timestamp when the deployment was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last configuration update, or `None` if never modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the deployment was soft-deleted, or `None` if still active.","type":["string","null"],"format":"date-time"}},"required":["id","model_id","gpu_type","allow_cpu","instances","parallel","created"],"oneOf":[{"type":"object","properties":{"deployment_engine":{"type":"string","const":"CleuraAiManager1_0"}},"required":["deployment_engine"],"allOf":[{"$ref":"#/components/schemas/ManagerInferenceEngineConfiguration"}]},{"type":"object","properties":{"deployment_engine":{"type":"string","const":"GpuStack0_7_1"}},"required":["deployment_engine"],"allOf":[{"$ref":"#/components/schemas/GpuStack0_7_1InferenceEngineConfiguration"}]},{"type":"object","properties":{"deployment_engine":{"type":"string","const":"GpuStack2_1"}},"required":["deployment_engine"],"allOf":[{"$ref":"#/components/schemas/GpuStack2_1InferenceEngineConfiguration"}]}]},"OptionalLlamaCppServerArgs":{"description":"Optional llama.cpp server arguments that can be omitted (all fields default to `None`).","type":"object","properties":{"context_size":{"description":"The total context size in terms of tokens.\n\nCorresponds to the following Llama CPP server flags:\n- `--ctx-size`\n- `-c`","type":["integer","null"],"format":"uint32","minimum":0},"context_shift":{"description":"Whether to use context shift on infinite text generation\n\nCorresponds to the following Llama CPP server flags:\n- `--context-shift`\n- `--no-context-shift`","type":["boolean","null"]},"pooling":{"description":"Pooling type for embeddings, use model default if unspecified\n\nCorresponds to the following Llama CPP server flags:\n- `--pooling`","anyOf":[{"$ref":"#/components/schemas/LlamaCppServerPoolingArg"},{"type":"null"}]},"embedding":{"description":"Restrict to only support embedding use case; use only with dedicated embedding models.\n\nCorresponds to the following Llama CPP server flags:\n- `--embedding`\n- `--embeddings`","type":["boolean","null"]},"reranking":{"description":"Enable reranking endpoint on server.\n\nCorresponds to the following Llama CPP server flags:\n- `--reranking`\n- `--rerank`","type":["boolean","null"]},"temperature":{"description":"Sampling temperature. Higher values increase randomness.\n\nCorresponds to the following Llama CPP server flags:\n- `--temp`","type":["number","null"],"format":"float"},"top_k":{"description":"Limit the next token selection to the K most probable tokens.\n\nCorresponds to the following Llama CPP server flags:\n- `--top-k`","type":["integer","null"],"format":"uint32","minimum":0},"top_p":{"description":"Limit the next token selection to a subset of tokens with a cumulative probability above P.\n\nCorresponds to the following Llama CPP server flags:\n- `--top-p`","type":["number","null"],"format":"float"},"min_p":{"description":"Minimum probability for a token to be considered, relative to the most likely token.\n\nCorresponds to the following Llama CPP server flags:\n- `--min-p`","type":["number","null"],"format":"float"},"repeat_penalty":{"description":"Control the repetition of token sequences in the generated text.\n\nCorresponds to the following Llama CPP server flags:\n- `--repeat-penalty`","type":["number","null"],"format":"float"},"seed":{"description":"Set the random number generator seed for reproducibility.\n\nCorresponds to the following Llama CPP server flags:\n- `--seed`\n- `-s`","type":["integer","null"],"format":"uint32","minimum":0},"n_predict":{"description":"Maximum number of tokens to predict. Use -1 for infinite.\n\nCorresponds to the following Llama CPP server flags:\n- `--n-predict`\n- `-n`","type":["integer","null"],"format":"int32"},"mirostat":{"description":"Mirostat sampling mode (0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0).\n\nCorresponds to the following Llama CPP server flags:\n- `--mirostat`","type":["integer","null"],"format":"uint8","minimum":0,"maximum":255},"mirostat_lr":{"description":"Mirostat learning rate (eta).\n\nCorresponds to the following Llama CPP server flags:\n- `--mirostat-lr`","type":["number","null"],"format":"float"},"mirostat_ent":{"description":"Mirostat target entropy (tau).\n\nCorresponds to the following Llama CPP server flags:\n- `--mirostat-ent`","type":["number","null"],"format":"float"}}},"LlamaCppServerPoolingArg":{"description":"Pooling strategy for embedding models.","oneOf":[{"description":"No pooling.","type":"string","const":"None"},{"description":"Mean pooling over token embeddings.","type":"string","const":"Mean"},{"description":"Use the CLS token embedding.","type":"string","const":"Cls"},{"description":"Use the last token embedding.","type":"string","const":"Last"},{"description":"Rank-based pooling for reranking models.","type":"string","const":"Rank"}]},"LlamaCppModelSource":{"description":"Source location for llama.cpp model files.","oneOf":[{"description":"Model files provided as direct URLs.","type":"object","properties":{"model_gguf_files":{"description":"URLs to the primary GGUF model files.","type":"array","items":{"type":"string","format":"uri"},"minItems":1},"draft_model_gguf_files":{"description":"Optional URLs to draft model GGUF files for speculative decoding.","type":["array","null"],"items":{"type":"string","format":"uri"},"minItems":1,"default":null},"mmproj_gguf_file":{"description":"Optional URL to a multi-modal projector GGUF file.","type":["string","null"],"format":"uri","default":null},"access_token":{"description":"Optional bearer token for authenticated downloads.","type":["string","null"],"default":null},"type":{"type":"string","const":"Urls"}},"required":["type","model_gguf_files"]},{"description":"Model files sourced from a HuggingFace repository.","type":"object","properties":{"repo":{"description":"HuggingFace repository identifier (e.g. `\"org/model-name\"`).","type":"string"},"model_gguf_filename":{"description":"Filename of the primary GGUF model within the repository.\n\nWhen `None`, the manager infers the file from the repo by looking\nfor a single `.gguf`. Errors if 0 or multiple `.gguf` files are\nfound — specify the filename explicitly in that case.","type":["string","null"],"default":null},"draft_model_gguf_filename":{"description":"Optional filename of a draft model GGUF for speculative decoding.","type":["string","null"],"default":null},"mmproj_gguf_file":{"description":"Optional filename of a multi-modal projector GGUF.","type":["string","null"],"default":null},"access_token":{"description":"Optional bearer token for accessing private repositories.","type":["string","null"],"default":null},"type":{"type":"string","const":"HuggingFaceRepo"}},"required":["type","repo"]}]},"OptionalWhisperCppServerArgs":{"description":"Optional whisper.cpp server arguments that can be omitted (all fields default to `None`).","type":"object","properties":{"translate":{"description":"Translate audio to English.\n\nCorresponds to the following Whisper CPP server flags:\n- `--translate`\n- `-tr`","type":["boolean","null"]},"diarize":{"description":"Enable speaker diarization.\n\nCorresponds to the following Whisper CPP server flags:\n- `--diarize`\n- `-di`","type":["boolean","null"]},"no_timestamps":{"description":"Disable timestamps in output.\n\nCorresponds to the following Whisper CPP server flags:\n- `--no-timestamps`\n- `-nt`","type":["boolean","null"]},"detect_language":{"description":"Only detect the language of the audio.\n\nCorresponds to the following Whisper CPP server flags:\n- `--detect-language`\n- `-dl`","type":["boolean","null"]},"max_context":{"description":"Maximum number of text context tokens.\n\nCorresponds to the following Whisper CPP server flags:\n- `--max-context`\n- `-mc`","type":["integer","null"],"format":"uint32","minimum":0},"max_len":{"description":"Maximum segment length in characters.\n\nCorresponds to the following Whisper CPP server flags:\n- `--max-len`\n- `-ml`","type":["integer","null"],"format":"uint32","minimum":0},"split_on_word":{"description":"Split on word boundaries.\n\nCorresponds to the following Whisper CPP server flags:\n- `--split-on-word`\n- `-sow`","type":["boolean","null"]},"best_of":{"description":"Number of best candidates to keep.\n\nCorresponds to the following Whisper CPP server flags:\n- `--best-of`\n- `-bo`","type":["integer","null"],"format":"uint32","minimum":0},"beam_size":{"description":"Beam search size.\n\nCorresponds to the following Whisper CPP server flags:\n- `--beam-size`\n- `-bs`","type":["integer","null"],"format":"uint32","minimum":0},"suppress_nst":{"description":"Suppress non-speech tokens.\n\nCorresponds to the following Whisper CPP server flags:\n- `--suppress-nst`\n- `-sns`","type":["boolean","null"]},"prompt":{"description":"Initial prompt for the decoder.\n\nCorresponds to the following Whisper CPP server flags:\n- `--prompt`","type":["string","null"]},"temperature":{"description":"Sampling temperature for transcription.\n\nCorresponds to the following Whisper CPP server flags:\n- `--temperature`","type":["number","null"],"format":"float"},"temperature_inc":{"description":"Temperature increment on decoder fallback.\n\nCorresponds to the following Whisper CPP server flags:\n- `--temperature-inc`","type":["number","null"],"format":"float"},"entropy_thold":{"description":"Entropy threshold for decoder fail.\n\nCorresponds to the following Whisper CPP server flags:\n- `--entropy-thold`\n- `-et`","type":["number","null"],"format":"float"},"logprob_thold":{"description":"Log probability threshold for decoder fail.\n\nCorresponds to the following Whisper CPP server flags:\n- `--logprob-thold`\n- `-lt`","type":["number","null"],"format":"float"},"audio_ctx":{"description":"Audio context size (0 = use default).\n\nCorresponds to the following Whisper CPP server flags:\n- `--audio-ctx`","type":["integer","null"],"format":"uint32","minimum":0}}},"WhisperCppModelSource":{"description":"Source location for whisper.cpp model files.","oneOf":[{"description":"Model file provided as a direct URL.","type":"object","properties":{"model_ggml_file":{"description":"URL to the GGML whisper model file.","type":"string","format":"uri"},"access_token":{"description":"Optional bearer token for authenticated downloads.","type":["string","null"],"default":null},"type":{"type":"string","const":"Urls"}},"required":["type","model_ggml_file"]},{"description":"Model file sourced from a HuggingFace repository.","type":"object","properties":{"repo":{"description":"HuggingFace repository identifier.","type":"string"},"model_ggml_filename":{"description":"Filename of the GGML whisper model within the repository.\n\nWhen `None`, the manager infers the file from the repo by looking\nfor a single `.bin`. Errors if 0 or multiple `.bin` files are\nfound — specify the filename explicitly in that case.","type":["string","null"],"default":null},"access_token":{"description":"Optional bearer token for accessing private repositories.","type":["string","null"],"default":null},"type":{"type":"string","const":"HuggingFaceRepo"}},"required":["type","repo"]}]},"OptionalVllmServerArgs":{"description":"Optional vLLM server arguments that can be omitted (all fields default to `None`).","type":"object","properties":{"max_num_seqs":{"description":"Maximum number of sequences per iteration.\n\nCorresponds to the following vLLM server flags:\n- `--max-num-seqs`","type":["integer","null"],"format":"uint32","minimum":0},"max_model_len":{"description":"Maximum model context length.\n\nCorresponds to the following vLLM server flags:\n- `--max-model-len`","type":["integer","null"],"format":"uint32","minimum":0},"dtype":{"description":"Data type for model weights and activations.\n\nCorresponds to the following vLLM server flags:\n- `--dtype`","type":["string","null"]},"quantization":{"description":"Method for quantization.\n\nCorresponds to the following vLLM server flags:\n- `--quantization`\n- `-q`","type":["string","null"]},"seed":{"description":"Random seed for reproducibility.\n\nCorresponds to the following vLLM server flags:\n- `--seed`","type":["integer","null"],"format":"uint32","minimum":0},"enable_prefix_caching":{"description":"Enable prefix caching.\n\nCorresponds to the following vLLM server flags:\n- `--enable-prefix-caching`","type":["boolean","null"]},"gpu_memory_utilization":{"description":"Fraction of GPU memory to use (0.0 to 1.0). Auto-calculated if left empty.\n\nWhen omitted the system automatically calculates a safe value based on\navailable GPU memory. Values below the model's minimum requirement will\nbe rejected.\n\nCorresponds to the following vLLM server flags:\n- `--gpu-memory-utilization`","type":["number","null"],"format":"float","minimum":0.01,"maximum":1.0},"enable_auto_tool_choice":{"description":"Auto tool choice.\n\nIt tells vLLM that you want to enable the model to generate its own tool calls when it deems appropriate.\n\nCorresponds to the following vLLM server flags:\n- `--enable-auto-tool-choice`","type":["boolean","null"]},"tool_call_parser":{"description":"Tool call parser\n\nSelect the tool parser to use. Additional tool parsers will continue to be added in the future.\n\nCorresponds to the following vLLM server flags:\n- `--tool-call-parser`","type":["string","null"]},"reasoning_parser":{"description":"Reasoning parser.\n\nSpecifies the reasoning parser to use for extracting reasoning content from the model output.\n\nCorresponds to the following vLLM server flags:\n- `--reasoning-parser`","type":["string","null"]}}},"VllmModelSource":{"description":"Source location for vLLM model files.","oneOf":[{"description":"Model sourced from a HuggingFace repository.","type":"object","properties":{"repo":{"description":"HuggingFace repository identifier.","type":"string"},"model_gguf_filename":{"description":"Optional filename of a GGUF model within the repository.\n\nvLLM accepts either a whole repo (multi-file safetensors model) or\na single GGUF file. When `None`, the manager downloads the whole\nrepo (safetensors path). When `Some`, the manager pins exactly that\nGGUF file.","type":["string","null"],"default":null},"access_token":{"description":"Optional bearer token for accessing private repositories.","type":["string","null"],"default":null},"type":{"type":"string","const":"HuggingFaceRepo"}},"required":["type","repo"]}]},"ManagerInferenceEngineConfiguration":{"description":"Manager-side inference engine configuration combining engine args with model source.","oneOf":[{"description":"llama.cpp configuration with model source.","type":"object","properties":{"inference_engine_args":{"description":"Optional llama.cpp server arguments.","default":{},"allOf":[{"$ref":"#/components/schemas/OptionalLlamaCppServerArgs"}]},"model_source":{"description":"Source location for the GGUF model files.","allOf":[{"$ref":"#/components/schemas/LlamaCppModelSource"}]},"inference_engine":{"type":"string","const":"LlamaCpp"}},"required":["inference_engine","model_source"]},{"description":"whisper.cpp configuration with model source.","type":"object","properties":{"inference_engine_args":{"description":"Optional whisper.cpp server arguments.","default":{},"allOf":[{"$ref":"#/components/schemas/OptionalWhisperCppServerArgs"}]},"model_source":{"description":"Source location for the whisper model files.","allOf":[{"$ref":"#/components/schemas/WhisperCppModelSource"}]},"inference_engine":{"type":"string","const":"WhisperCpp"}},"required":["inference_engine","model_source"]},{"description":"vLLM configuration with model source.","type":"object","properties":{"inference_engine_args":{"description":"Optional vLLM server arguments.","default":{},"allOf":[{"$ref":"#/components/schemas/OptionalVllmServerArgs"}]},"model_source":{"description":"Source location for the vLLM model.","allOf":[{"$ref":"#/components/schemas/VllmModelSource"}]},"inference_engine":{"type":"string","const":"Vllm"}},"required":["inference_engine","model_source"]}]},"OptionalLlamaBoxArgs":{"type":"object","properties":{"context_size":{"description":"Set the size of the prompt context (default: loaded from model).","type":["integer","null"],"format":"uint32","minimum":0},"disable_jinja_templating":{"description":"Disable Jinja templating for chat templates.","type":["boolean","null"]},"gpu_layers":{"description":"Number of layers to offload to the GPU.","type":["integer","null"],"format":"uint32","minimum":0},"flash_attn":{"description":"Enable flash attention.","type":["boolean","null"]},"parallel":{"description":"Number of parallel sequences to decode.","type":["integer","null"],"format":"uint32","minimum":0},"temperature":{"description":"Sampling temperature. Higher values increase randomness.","type":["number","null"],"format":"float"},"top_k":{"description":"Limit the next token selection to the K most probable tokens.","type":["integer","null"],"format":"uint32","minimum":0},"top_p":{"description":"Limit the next token selection to a subset of tokens with a cumulative probability above P.","type":["number","null"],"format":"float"},"min_p":{"description":"Minimum probability for a token to be considered, relative to the most likely token.","type":["number","null"],"format":"float"},"mirostat":{"description":"Mirostat sampling mode (0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0).","type":["integer","null"],"format":"uint8","minimum":0,"maximum":255},"mirostat_lr":{"description":"Mirostat learning rate (eta).","type":["number","null"],"format":"float"},"mirostat_ent":{"description":"Mirostat target entropy (tau).","type":["number","null"],"format":"float"}}},"GpuStack0_7_1Source":{"description":"Source configuration for downloading model weights when using GpuStack 0.7.1 engines.\n\nSerialized with a `source` tag field for JSON discrimination.","oneOf":[{"description":"Indicates that the model weights should be downloaded as a GGUF-file from a Huggingface repo","type":"object","properties":{"repo_id":{"description":"HuggingFace repository identifier in `owner/repo` format (e.g. `\"TheBloke/Llama-2-7B-GGUF\"`).","allOf":[{"$ref":"#/components/schemas/HuggingfaceRepoId"}]},"filename":{"description":"Name of the GGUF file to download from the repository (e.g. `\"llama-2-7b.Q4_K_M.gguf\"`).","allOf":[{"$ref":"#/components/schemas/GgufFilename"}]},"source":{"type":"string","const":"Huggingface"}},"required":["source","repo_id","filename"]}]},"HuggingfaceRepoId":{"type":"string","minLength":1,"maxLength":255},"GgufFilename":{"type":"string","minLength":1,"maxLength":255},"OptionalVoxBoxArgs":{"type":"object","properties":{"language":{"description":"Default language for transcription.","anyOf":[{"$ref":"#/components/schemas/LanguageCode"},{"type":"null"}]},"threads":{"description":"Number of threads to use for computation.","type":["integer","null"],"format":"uint32","minimum":0}}},"LanguageCode":{"type":"string","minLength":1,"maxLength":64},"GpuStack0_7_1InferenceEngineConfiguration":{"oneOf":[{"type":"object","properties":{"inference_engine_args":{"default":{},"allOf":[{"$ref":"#/components/schemas/OptionalLlamaBoxArgs"}]},"model_source":{"$ref":"#/components/schemas/GpuStack0_7_1Source"},"inference_engine":{"type":"string","const":"LlamaBox"}},"required":["inference_engine","model_source"]},{"type":"object","properties":{"inference_engine_args":{"default":{},"allOf":[{"$ref":"#/components/schemas/OptionalVoxBoxArgs"}]},"model_source":{"$ref":"#/components/schemas/GpuStack0_7_1Source"},"inference_engine":{"type":"string","const":"VoxBox"}},"required":["inference_engine","model_source"]}]},"GpuStack2_1Source":{"description":"Source configuration for downloading model weights when using GpuStack 2.1 engines.\n\nSerialized with a `source` tag field for JSON discrimination.","oneOf":[{"description":"Indicates that the model weights should be downloaded as a GGUF-file from a Huggingface repo.","type":"object","properties":{"repo_id":{"description":"HuggingFace repository identifier in `owner/repo` format (e.g. `\"bartowski/Llama-3.2-1B-Instruct-GGUF\"`).","allOf":[{"$ref":"#/components/schemas/HuggingfaceRepoId"}]},"filename":{"description":"Name of the GGUF file to download from the repository (e.g. `\"Llama-3.2-1B-Instruct-Q4_K_M.gguf\"`).","allOf":[{"$ref":"#/components/schemas/GgufFilename"}]},"source":{"type":"string","const":"Huggingface"}},"required":["source","repo_id","filename"]}]},"GpuStack2_1InferenceEngineConfiguration":{"oneOf":[{"type":"object","properties":{"inference_engine_args":{"default":{},"allOf":[{"$ref":"#/components/schemas/OptionalLlamaCppServerArgs"}]},"model_source":{"$ref":"#/components/schemas/GpuStack2_1Source"},"inference_engine":{"type":"string","const":"LlamaCpp"}},"required":["inference_engine","model_source"]},{"type":"object","properties":{"inference_engine_args":{"default":{},"allOf":[{"$ref":"#/components/schemas/OptionalVoxBoxArgs"}]},"model_source":{"$ref":"#/components/schemas/GpuStack2_1Source"},"inference_engine":{"type":"string","const":"VoxBox"}},"required":["inference_engine","model_source"]}]},"DeploymentStatus":{"description":"Lifecycle status of a deployment.","oneOf":[{"description":"The deployment is waiting in the queue to be claimed by a processor.","type":"object","properties":{"status":{"type":"string","const":"Queued"}},"required":["status"]},{"description":"The deployment has been claimed and is being set up on workers.","type":"object","properties":{"bytes_done":{"type":"integer","format":"uint64","minimum":0,"default":0},"bytes_total":{"type":"integer","format":"uint64","minimum":0,"default":0},"speed_bps":{"type":["integer","null"],"format":"uint64","minimum":0,"default":null},"eta_seconds":{"type":["integer","null"],"format":"uint64","minimum":0,"default":null},"status":{"type":"string","const":"Pending"}},"required":["status"]},{"description":"The deployment is running and serving inference requests.","type":"object","properties":{"status":{"type":"string","const":"Active"}},"required":["status"]},{"description":"The deployment failed during setup or was expired due to a timeout.","type":"object","properties":{"status":{"type":"string","const":"Failed"}},"required":["status"]}]},"DeploymentData":{"description":"Mutable configuration for a [`Deployment`], controlling hardware, scaling, and inference engine selection.","type":"object","properties":{"gpu_type":{"description":"The type of Gpu that the model should run on","allOf":[{"$ref":"#/components/schemas/GpuType"}]},"allow_cpu":{"description":"Wether or not to allow Cpu-offloading","type":"boolean"},"instances":{"description":"The requested instance count. Requests will be distributed Round Robin.","type":"integer","format":"uint8","minimum":1,"maximum":255},"parallel":{"description":"The amount of parallel requests each instance should try to handle at once. Further requests will be queued.","type":"integer","format":"uint32","minimum":1}},"required":["gpu_type","allow_cpu","instances","parallel"],"oneOf":[{"type":"object","properties":{"deployment_engine":{"type":"string","const":"CleuraAiManager1_0"}},"required":["deployment_engine"],"allOf":[{"$ref":"#/components/schemas/ManagerInferenceEngineConfiguration"}]},{"type":"object","properties":{"deployment_engine":{"type":"string","const":"GpuStack0_7_1"}},"required":["deployment_engine"],"allOf":[{"$ref":"#/components/schemas/GpuStack0_7_1InferenceEngineConfiguration"}]},{"type":"object","properties":{"deployment_engine":{"type":"string","const":"GpuStack2_1"}},"required":["deployment_engine"],"allOf":[{"$ref":"#/components/schemas/GpuStack2_1InferenceEngineConfiguration"}]}]},"DeploymentEvent":{"description":"Timestamped lifecycle event emitted during a [`Deployment`] rollout.\n\nEvents are append-only and ordered by `created` timestamp,\nproviding a full audit trail of the deployment process.","type":"object","properties":{"deployment_id":{"description":"Identifier of the [`Deployment`] this event belongs to.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"created":{"description":"Timestamp when this event was recorded.","type":"string","format":"date-time"}},"required":["deployment_id","created"],"oneOf":[{"description":"The deployment is starting.","type":"object","properties":{"name":{"type":"string","const":"Started"}},"required":["name"]},{"description":"The deployment of an instance is pending.","type":"object","properties":{"instance_index":{"description":"Zero-based index identifying which instance within the deployment is pending provisioning.","type":"integer","format":"uint8","minimum":0,"maximum":255},"name":{"type":"string","const":"InstancePending"}},"required":["name","instance_index"]},{"description":"An instance is downloading the model files.","type":"object","properties":{"instance_index":{"description":"Zero-based index identifying which instance is downloading model weights.","type":"integer","format":"uint8","minimum":0,"maximum":255},"mb_downloaded":{"description":"Megabytes downloaded so far for this instance.","type":"integer","format":"uint32","minimum":0},"mb_remaining":{"description":"Estimated megabytes remaining to download, or `None` if the total file size is unknown.","type":["integer","null"],"format":"uint32","minimum":0},"speed_bps":{"type":["integer","null"],"format":"uint64","minimum":0,"default":null},"eta_seconds":{"type":["integer","null"],"format":"uint64","minimum":0,"default":null},"name":{"type":"string","const":"InstanceDownloading"}},"required":["name","instance_index","mb_downloaded"]},{"description":"An instance deployment failed. The deployment will be cancelled.","type":"object","properties":{"instance_index":{"description":"Zero-based index identifying which instance encountered the error.","type":"integer","format":"uint8","minimum":0,"maximum":255},"error":{"description":"Human-readable description of the failure that caused this instance to fail.","type":"string"},"name":{"type":"string","const":"InstanceError"}},"required":["name","instance_index","error"]},{"description":"An instance has been successfully deployed and is reporting a healthy state.","type":"object","properties":{"instance_index":{"description":"Zero-based index identifying which instance is now running and healthy.","type":"integer","format":"uint8","minimum":0,"maximum":255},"name":{"type":"string","const":"InstanceRunning"}},"required":["name","instance_index"]},{"description":"An external resource reported an error. The deployment will be cancelled.","type":"object","properties":{"error":{"description":"Human-readable description of the external resource failure.","type":"string"},"name":{"type":"string","const":"Error"}},"required":["name","error"]},{"description":"The deployment was aborted.","type":"object","properties":{"name":{"type":"string","const":"Aborted"}},"required":["name"]},{"description":"All instances have been successfully deployed and usage has been recorded.","type":"object","properties":{"name":{"type":"string","const":"Completed"}},"required":["name"]},{"description":"An existing deployment was collected from the provider and registered.","type":"object","properties":{"name":{"type":"string","const":"Collected"}},"required":["name"]}]},"DeploymentUsage":{"description":"Deployment resource usage tracking.\n\nThe hardware requirements of a model given its current configuration.\nUses deployment_id as the primary key since there's only one usage record per deployment.","type":"object","properties":{"deployment_id":{"description":"References the [`DeploymentId`] this usage record belongs to; acts as the primary key since each deployment has exactly one active usage record.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"gpus":{"description":"GPU resource allocation keyed by [`GpuType`]; each entry captures the VRAM reserved and the number of GPUs used for that type.","type":"object","additionalProperties":{"$ref":"#/components/schemas/GpuAllocation"}},"cpu":{"description":"Marks if any CPUs are used for offloading","type":"boolean"},"ram_mb":{"description":"Indicates the amount of RAM in megabytes that the model consumes","type":"integer","format":"uint64","minimum":0},"resource_usage_status":{"description":"Whether this resource usage data is estimated or confirmed from the running deployment.","allOf":[{"$ref":"#/components/schemas/ResourceUsageStatus"}]},"created":{"description":"The time the resources were claimed","type":"string","format":"date-time"},"released":{"description":"The time the resources were released (The value being None/Null means the resources are still being used by the model)","type":["string","null"],"format":"date-time"}},"required":["deployment_id","gpus","cpu","ram_mb","resource_usage_status","created"]},"GpuAllocation":{"description":"Per-GPU-type resource allocation for a deployment.","type":"object","properties":{"vram_mb":{"description":"VRAM allocation in megabytes for this GPU type.","type":"integer","format":"uint64","minimum":0},"count":{"description":"Number of GPUs of this type used by the deployment.","type":"integer","format":"uint64","minimum":0},"vram_per_gpu_mb":{"description":"VRAM capacity per physical GPU in megabytes, populated from provider discovery.\nUsed to estimate GPU count when `count` is zero.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["vram_mb","count"]},"ResourceUsageStatus":{"description":"Whether the resource usage data is an estimate from pre-deployment evaluation\nor confirmed from the actual running deployment.","oneOf":[{"description":"Resource usage estimated during deployment evaluation, before the model is running.","type":"string","const":"Estimated"},{"description":"Resource usage confirmed from the actual running deployment.","type":"string","const":"Confirmed"}]},"Alias":{"description":"Model alias entity.\n\nAssociates a user-friendly name with a model ID, allowing\nAPI clients to reference models by memorable names.","type":"object","properties":{"id":{"description":"Unique identifier for this alias.","allOf":[{"$ref":"#/components/schemas/AliasId"}]},"tenant_id":{"description":"[`TenantId`] that owns this alias; scopes the alias name to a single tenant namespace.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Target [`ModelId`] this alias resolves to when used in an API request.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"name":{"description":"Human-readable alias name (e.g., `\"gpt-4\"`); must be unique within the owning tenant.","allOf":[{"$ref":"#/components/schemas/AliasName"}]},"created":{"description":"Timestamp when the alias was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if the alias has never been modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the alias was soft-deleted, or `None` if still active.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","model_id","name","created"]},"AliasName":{"type":"string","minLength":1,"maxLength":255},"ModelIdPath2":{"type":"object","properties":{"model_id":{"$ref":"#/components/schemas/ModelId"}},"required":["model_id"]},"CreateModelDeprecationBody":{"type":"object","properties":{"target_model_id":{"anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}]},"on_expire":{"$ref":"#/components/schemas/ModelDeprecationOnExpire"},"deprecate_at":{"type":"string","format":"date-time"},"description":{"anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]}},"required":["on_expire","deprecate_at"]},"UpdateModelDeprecationBody":{"type":"object","properties":{"deprecate_at":{"type":"string","format":"date-time"},"on_expire":{"$ref":"#/components/schemas/ModelDeprecationOnExpire"},"description":{"anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]}},"required":["deprecate_at","on_expire"]},"ModelDeprecationDeletion":{"description":"Result of cancelling (soft-deleting) a model deprecation.","type":"object","properties":{"model_id":{"$ref":"#/components/schemas/ModelId"}},"required":["model_id"]},"IncludeDeletedQuery":{"type":"object","properties":{"include_deleted":{"type":["boolean","null"],"default":false}}},"DeploymentIdPath":{"type":"object","properties":{"deployment_id":{"$ref":"#/components/schemas/DeploymentId"}},"required":["deployment_id"]},"DateTimeQuery":{"type":"object","properties":{"datetime_gte":{"type":["string","null"],"format":"date-time"},"datetime_lt":{"type":["string","null"],"format":"date-time"}}},"DeploymentLogQuery":{"type":"object","properties":{"limit":{"type":["integer","null"],"format":"uint32","minimum":0},"offset":{"type":["integer","null"],"format":"uint32","minimum":0}}},"DeploymentLogEntry":{"description":"A single log line from a deployment's inference engine.","type":"object","properties":{"host":{"description":"Hostname of the machine that produced the log line.","type":"string"},"short_message":{"description":"The log message content.","type":"string"},"level":{"description":"Syslog severity level (0 = emergency, 6 = info, 7 = debug).","type":"integer","format":"uint8","minimum":0,"maximum":255},"timestamp":{"description":"When the log line was produced on the worker.","type":"string","format":"date-time"}},"required":["host","short_message","level","timestamp"]},"AliasAndModel":{"description":"Model alias entity.\n\nAssociates a user-friendly name with a model ID, allowing\nAPI clients to reference models by memorable names.","type":"object","properties":{"id":{"description":"Unique identifier for this alias.","allOf":[{"$ref":"#/components/schemas/AliasId"}]},"tenant_id":{"description":"[`TenantId`] that owns this alias; scopes the alias name to a single tenant namespace.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"Target [`ModelId`] this alias resolves to when used in an API request.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"name":{"description":"Human-readable alias name (e.g., `\"gpt-4\"`); must be unique within the owning tenant.","allOf":[{"$ref":"#/components/schemas/AliasName"}]},"created":{"description":"Timestamp when the alias was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if the alias has never been modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the alias was soft-deleted, or `None` if still active.","type":["string","null"],"format":"date-time"},"model":{"$ref":"#/components/schemas/Model"}},"required":["id","tenant_id","model_id","name","created","model"]},"AliasData":{"description":"Mutable fields of a model alias, used for creation and update requests.\n\nContains the target [`ModelId`] and the human-readable name that API clients\nuse to reference the model.","type":"object","properties":{"model_id":{"description":"Target [`ModelId`] this alias resolves to when used in an API request.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"name":{"description":"Human-readable alias name (e.g., `\"gpt-4\"`); must be unique within the owning tenant.","allOf":[{"$ref":"#/components/schemas/AliasName"}]}},"required":["model_id","name"]},"AliasIdPath":{"type":"object","properties":{"alias_id":{"$ref":"#/components/schemas/AliasId"}},"required":["alias_id"]},"TenantRelatedLicense":{"description":"A license related to a tenant, either owned or granted.","oneOf":[{"type":"object","properties":{"relationship":{"type":"string","const":"Owner"}},"required":["relationship"],"allOf":[{"$ref":"#/components/schemas/OwnedLicense"}]},{"type":"object","properties":{"relationship":{"type":"string","const":"Granted"}},"required":["relationship"],"allOf":[{"$ref":"#/components/schemas/GrantedLicense"}]}]},"ModelLicense":{"description":"Token, request, and pricing limits applied to a single model within a [`License`].\n\nEach quota map is keyed by [`Aggregation`] (e.g. per-minute, per-day) so that\nmultiple rolling windows can enforce independent ceilings simultaneously.","type":"object","properties":{"max_input_tokens":{"description":"Maximum input tokens allowed per [`Aggregation`] window; an empty map means no input-token limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"max_output_tokens":{"description":"Maximum output tokens allowed per [`Aggregation`] window; an empty map means no output-token limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"max_input_audio_seconds":{"description":"Maximum input audio seconds allowed per [`Aggregation`] window; an empty map means no audio-input limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"max_requests":{"description":"Maximum number of requests allowed per [`Aggregation`] window; an empty map means no request-rate limit.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0},"default":{}},"concurrent_limits":{"description":"Per-model concurrent limits (in-flight requests, TPS).","default":{"max_concurrent_requests":null,"max_concurrent_tps":null,"max_concurrent_input_tokens":null},"allOf":[{"$ref":"#/components/schemas/ConcurrentLimits"}]},"price_per_input_token":{"description":"Billable [`Price`] charged for each input token, or `None` if input tokens are unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_cached_input_token":{"description":"Billable [`Price`] charged for each input token the provider served from its prefix cache.\n\n`None` bills cached input tokens at `price_per_input_token`, so a license without a cached\nprice charges exactly what it would if no tokens were cached.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_output_token":{"description":"Billable [`Price`] charged for each output token, or `None` if output tokens are unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_input_audio_second":{"description":"Billable [`Price`] charged per second of input audio, or `None` if audio input is unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null}}},"ProviderLicense":{"description":"Infrastructure and GPU limits applied to a single provider within a [`License`].\n\nControls how many deployments, how much RAM, and which GPU types the tenant may\nprovision through this provider.","type":"object","properties":{"max_deployment_count":{"description":"Maximum number of concurrent deployments allowed, or `None` for unlimited deployments.","type":["integer","null"],"format":"uint8","minimum":0,"maximum":255,"default":null},"max_ram_mb":{"description":"Maximum total RAM in megabytes allocatable across all deployments, or `None` for unlimited RAM.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"step_ram_mb":{"description":"RAM allocation granularity in megabytes; requests are rounded up to the nearest multiple, or `None` if any size is allowed.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"allow_cpu":{"description":"Whether CPU-only (no GPU) deployments are permitted under this license.","type":"boolean","default":false},"price_per_second_per_mb_of_ram":{"description":"Billable [`Price`] per second per megabyte of RAM consumed, or `None` if RAM usage is unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"gpus":{"description":"Per-GPU-type limits and pricing keyed by [`GpuType`]; absent GPU types are implicitly disallowed.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderGpuLicense"},"default":{}}}},"LicenseSubscriptionCancellationRule":{"description":"Determines whether a subscription can be cancelled with immediate effect or if cancellations are deferred.","oneOf":[{"description":"Subscription can be cancelled with immediate effect.","type":"string","const":"Immediate"},{"description":"Subscription will remain active until the end of the current day.","type":"string","const":"EndOfDay"},{"description":"Subscription will remain active until the end of the current week (ending Sunday).","type":"string","const":"EndOfWeek"},{"description":"Subscription will remain active until the end of the current month.","type":"string","const":"EndOfMonth"}]},"LicenseBasePrice":{"description":"A recurring base price for a license, charged per time period.\nThe system calculates the per-second cost from this.","type":"object","properties":{"price":{"description":"The price amount and currency (e.g. 100 SEK).","allOf":[{"$ref":"#/components/schemas/Price"}]},"per":{"description":"The time period this price covers (e.g. Month means \"100 SEK per month\").","allOf":[{"$ref":"#/components/schemas/Aggregation"}]}},"required":["price","per"]},"LicenseGrant":{"description":"Cross-tenant grant that allows one tenant to consume resources under another tenant's [`License`].\n\nCreated when a license owner shares access with a different tenant,\nand soft-deleted when that access is revoked.","type":"object","properties":{"license_id":{"description":"Identifier of the [`License`] being granted.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Identifier of the [`Tenant`](crate::models::tenant::Tenant) receiving the grant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"created":{"description":"Timestamp when this grant was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if the grant has never been modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this grant was revoked, or `None` if the grant is still active.","type":["string","null"],"format":"date-time"}},"required":["license_id","tenant_id","created"]},"LicenseDeprecation":{"description":"Planned deprecation of a license, optionally migrating grantees to a target license.\n\nWhen a license owner wants to phase out a license, they create a deprecation\nspecifying an optional target license and a deadline (`deprecate_at`).\nIf a target is provided, grantees who accept are transferred immediately;\nthose who do not are force-transferred at the deadline. If no target is\nprovided, all grants are simply revoked and the source license is\nsoft-deleted at the deadline.","type":"object","properties":{"license_id":{"description":"License being deprecated (serves as the primary key).","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target_license_id":{"description":"Optional replacement license that grantees will be migrated to.","anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}]},"description":{"description":"Human-readable description shown to grantees explaining the deprecation.","anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]},"deprecate_at":{"description":"Deadline at which remaining grantees are force-transferred or revoked.","type":"string","format":"date-time"},"created":{"description":"Timestamp when this deprecation was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if never modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this deprecation was soft-deleted (cancelled or completed), or `None` if active.","type":["string","null"],"format":"date-time"}},"required":["license_id","deprecate_at","created"]},"OwnedLicense":{"description":"A license owned by the querying tenant.","type":"object","properties":{"id":{"description":"Unique identifier for this license.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Identifier of the [`Tenant`](crate::models::tenant::Tenant) that owns this license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable name shown in dashboards and administrative UIs.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"models":{"description":"Per-model token, request, and pricing limits keyed by [`ModelId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelLicense"}},"providers":{"description":"Per-provider infrastructure and GPU limits keyed by [`ProviderId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderLicense"}},"max_subscriptions":{"description":"The maximum number of subscriptions that can be created across all tenants.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"max_subscriptions_per_tenant":{"description":"The maximum number of subscriptions that can be created per tenant.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"subscription_cancellation_rule":{"description":"Whether subscriptions can be cancelled with immediate effect or are deferred.","default":"Immediate","allOf":[{"$ref":"#/components/schemas/LicenseSubscriptionCancellationRule"}]},"minimum_commitment_seconds":{"description":"Minimum number of seconds a subscription must remain active before\ncancellation can take effect. When set, the effective cancellation date\nis the later of the cancellation-rule date and `created + minimum_commitment_seconds`.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"base_price":{"description":"Optional recurring base price for this license, independent of usage.","anyOf":[{"$ref":"#/components/schemas/LicenseBasePrice"},{"type":"null"}],"default":null},"concurrent_limits":{"description":"License-level concurrent limits (apply across all models in this license).","default":{"max_concurrent_requests":null,"max_concurrent_tps":null,"max_concurrent_input_tokens":null},"allOf":[{"$ref":"#/components/schemas/ConcurrentLimits"}]},"concurrent_limits_by_model_type":{"description":"Per-model-type concurrent limits (apply across all models of that type in this license).","type":"object","additionalProperties":{"$ref":"#/components/schemas/ConcurrentLimits"},"default":{}},"created":{"description":"Timestamp when this license was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if the license has never been modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this license was soft-deleted, or `None` if it is still active.","type":["string","null"],"format":"date-time"},"grants":{"type":"array","items":{"$ref":"#/components/schemas/LicenseGrant"}},"active_subscriptions":{"description":"Total active subscriptions to this license across all grantee tenants.","type":"integer","format":"uint32","minimum":0},"deprecation":{"anyOf":[{"$ref":"#/components/schemas/LicenseDeprecation"},{"type":"null"}]}},"required":["id","tenant_id","display_name","models","providers","created","grants","active_subscriptions"]},"GrantedLicense":{"description":"A license granted to the querying tenant.","type":"object","properties":{"id":{"description":"Unique identifier for this license.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Identifier of the [`Tenant`](crate::models::tenant::Tenant) that owns this license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable name shown in dashboards and administrative UIs.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"models":{"description":"Per-model token, request, and pricing limits keyed by [`ModelId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelLicense"}},"providers":{"description":"Per-provider infrastructure and GPU limits keyed by [`ProviderId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderLicense"}},"max_subscriptions":{"description":"The maximum number of subscriptions that can be created across all tenants.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"max_subscriptions_per_tenant":{"description":"The maximum number of subscriptions that can be created per tenant.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"subscription_cancellation_rule":{"description":"Whether subscriptions can be cancelled with immediate effect or are deferred.","default":"Immediate","allOf":[{"$ref":"#/components/schemas/LicenseSubscriptionCancellationRule"}]},"minimum_commitment_seconds":{"description":"Minimum number of seconds a subscription must remain active before\ncancellation can take effect. When set, the effective cancellation date\nis the later of the cancellation-rule date and `created + minimum_commitment_seconds`.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"base_price":{"description":"Optional recurring base price for this license, independent of usage.","anyOf":[{"$ref":"#/components/schemas/LicenseBasePrice"},{"type":"null"}],"default":null},"concurrent_limits":{"description":"License-level concurrent limits (apply across all models in this license).","default":{"max_concurrent_requests":null,"max_concurrent_tps":null,"max_concurrent_input_tokens":null},"allOf":[{"$ref":"#/components/schemas/ConcurrentLimits"}]},"concurrent_limits_by_model_type":{"description":"Per-model-type concurrent limits (apply across all models of that type in this license).","type":"object","additionalProperties":{"$ref":"#/components/schemas/ConcurrentLimits"},"default":{}},"created":{"description":"Timestamp when this license was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if the license has never been modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this license was soft-deleted, or `None` if it is still active.","type":["string","null"],"format":"date-time"},"grant":{"$ref":"#/components/schemas/LicenseGrant"},"active_subscriptions":{"description":"Active subscriptions the querying tenant holds against this license.","type":"integer","format":"uint32","minimum":0},"deprecation":{"anyOf":[{"$ref":"#/components/schemas/LicenseDeprecation"},{"type":"null"}]}},"required":["id","tenant_id","display_name","models","providers","created","grant","active_subscriptions"]},"LicenseData":{"description":"Mutable configuration for a [`License`].\n\nContains the human-readable name, per-model token and request quotas, and\nper-provider infrastructure limits that can be updated after license creation.","type":"object","properties":{"display_name":{"description":"Human-readable name shown in dashboards and administrative UIs.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"models":{"description":"Per-model token, request, and pricing limits keyed by [`ModelId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelLicense"}},"providers":{"description":"Per-provider infrastructure and GPU limits keyed by [`ProviderId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderLicense"}},"max_subscriptions":{"description":"The maximum number of subscriptions that can be created across all tenants.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"max_subscriptions_per_tenant":{"description":"The maximum number of subscriptions that can be created per tenant.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"subscription_cancellation_rule":{"description":"Whether subscriptions can be cancelled with immediate effect or are deferred.","default":"Immediate","allOf":[{"$ref":"#/components/schemas/LicenseSubscriptionCancellationRule"}]},"minimum_commitment_seconds":{"description":"Minimum number of seconds a subscription must remain active before\ncancellation can take effect. When set, the effective cancellation date\nis the later of the cancellation-rule date and `created + minimum_commitment_seconds`.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"base_price":{"description":"Optional recurring base price for this license, independent of usage.","anyOf":[{"$ref":"#/components/schemas/LicenseBasePrice"},{"type":"null"}],"default":null},"concurrent_limits":{"description":"License-level concurrent limits (apply across all models in this license).","default":{"max_concurrent_requests":null,"max_concurrent_tps":null,"max_concurrent_input_tokens":null},"allOf":[{"$ref":"#/components/schemas/ConcurrentLimits"}]},"concurrent_limits_by_model_type":{"description":"Per-model-type concurrent limits (apply across all models of that type in this license).","type":"object","additionalProperties":{"$ref":"#/components/schemas/ConcurrentLimits"},"default":{}}},"required":["display_name","models","providers"]},"License":{"description":"Resource-usage license assigned to a [`Tenant`](crate::models::tenant::Tenant).\n\nA license bundles per-model token quotas and per-provider infrastructure limits\ninto a single grantable unit. Tenants consume resources only up to the ceilings\ndefined by their active licenses.","type":"object","properties":{"id":{"description":"Unique identifier for this license.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Identifier of the [`Tenant`](crate::models::tenant::Tenant) that owns this license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"display_name":{"description":"Human-readable name shown in dashboards and administrative UIs.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"models":{"description":"Per-model token, request, and pricing limits keyed by [`ModelId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelLicense"}},"providers":{"description":"Per-provider infrastructure and GPU limits keyed by [`ProviderId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderLicense"}},"max_subscriptions":{"description":"The maximum number of subscriptions that can be created across all tenants.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"max_subscriptions_per_tenant":{"description":"The maximum number of subscriptions that can be created per tenant.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"subscription_cancellation_rule":{"description":"Whether subscriptions can be cancelled with immediate effect or are deferred.","default":"Immediate","allOf":[{"$ref":"#/components/schemas/LicenseSubscriptionCancellationRule"}]},"minimum_commitment_seconds":{"description":"Minimum number of seconds a subscription must remain active before\ncancellation can take effect. When set, the effective cancellation date\nis the later of the cancellation-rule date and `created + minimum_commitment_seconds`.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"base_price":{"description":"Optional recurring base price for this license, independent of usage.","anyOf":[{"$ref":"#/components/schemas/LicenseBasePrice"},{"type":"null"}],"default":null},"concurrent_limits":{"description":"License-level concurrent limits (apply across all models in this license).","default":{"max_concurrent_requests":null,"max_concurrent_tps":null,"max_concurrent_input_tokens":null},"allOf":[{"$ref":"#/components/schemas/ConcurrentLimits"}]},"concurrent_limits_by_model_type":{"description":"Per-model-type concurrent limits (apply across all models of that type in this license).","type":"object","additionalProperties":{"$ref":"#/components/schemas/ConcurrentLimits"},"default":{}},"created":{"description":"Timestamp when this license was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if the license has never been modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this license was soft-deleted, or `None` if it is still active.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","display_name","models","providers","created"]},"LicenseIdPath":{"type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"}},"required":["license_id"]},"LicenseUsage":{"description":"Represents the usage summary, price and cost for all license grantees during a given window","type":"object","properties":{"license_id":{"description":"Identifier of the license used","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"datetime_gte":{"description":"The inclusive start time of this usage window","type":"string","format":"date-time"},"datetime_lt":{"description":"The exclusive end time of this usage window","type":"string","format":"date-time"},"grantee_usage":{"description":"The usage per license grantee tenant id within the window","type":"object","additionalProperties":{"$ref":"#/components/schemas/GranteeLicenseUsageData"}}},"required":["license_id","datetime_gte","datetime_lt","grantee_usage"]},"GranteeLicenseUsageData":{"description":"Represents the usage summary, price and cost for all license grantees during a given window","type":"object","properties":{"model_usage":{"description":"Model usage (requests) summary, price and cost during this window","type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelLicenseUsage"}},"provider_usage":{"description":"Provider usage (deployments) summary, price and cost during this window","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderLicenseUsage"}},"subscription_usage":{"description":"Subscription usage (active intervals) summary, price and cost during this window","allOf":[{"$ref":"#/components/schemas/SubscriptionLicenseUsage"}]}},"required":["model_usage","provider_usage","subscription_usage"]},"ModelLicenseUsage":{"description":"Model usage (requests) summary, price and cost during this window","type":"object","properties":{"total_requests":{"description":"Total number of requests in the window (all statuses).","type":"integer","format":"uint64","minimum":0},"total_input_tokens":{"description":"Sum of input tokens across all requests with usage data.","type":"integer","format":"uint64","minimum":0},"total_cached_input_tokens":{"description":"How many of `total_input_tokens` the provider served from its prefix cache.","type":"integer","format":"uint64","minimum":0,"default":0},"total_output_tokens":{"description":"Sum of output tokens across all requests with usage data.","type":"integer","format":"uint64","minimum":0},"total_input_audio_seconds":{"description":"Sum of input audio seconds across all requests with usage data.","type":"integer","format":"uint64","minimum":0},"price_per_input_token":{"description":"Billable [`Price`] charged for each input token, or `None` if input tokens are unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_cached_input_token":{"description":"Billable [`Price`] charged for each input token the provider served from its prefix cache.\n\n`None` bills cached input tokens at `price_per_input_token`, so a license without a cached\nprice charges exactly what it would if no tokens were cached.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_output_token":{"description":"Billable [`Price`] charged for each output token, or `None` if output tokens are unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"price_per_input_audio_second":{"description":"Billable [`Price`] charged per second of input audio, or `None` if audio input is unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"total_requests_cost":{"description":"Total cost of all requests made by the grantee in this window.","anyOf":[{"$ref":"#/components/schemas/PriceTable"},{"type":"null"}]},"total_input_tokens_cost":{"description":"Total cost of the input tokens the provider did not serve from its prefix cache, across\nall requests made by the grantee in this window. Cached input tokens are priced in\n`total_cached_input_tokens_cost` instead.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]},"total_cached_input_tokens_cost":{"description":"Total cost of the input tokens the provider served from its prefix cache, across all\nrequests made by the grantee in this window.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"total_input_audio_seconds_cost":{"description":"Total cost of used input audio seconds across all requests made by the grantee in this window.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]},"total_output_tokens_cost":{"description":"Total cost of produced output tokens across all requests made by the grantee in this window.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}},"required":["total_requests","total_input_tokens","total_output_tokens","total_input_audio_seconds"]},"PriceTable":{"description":"A sum of prices, holding one amount per currency.\n\nAlways holds at least one entry. Its JSON representation is a map from\ncurrency to amount:\n```json\n{ \"SEK\": \"1.2\", \"EUR\": \"0.12\" }\n```","type":"object","additionalProperties":{"type":["string","number"],"pattern":"^-?\\d+(\\.\\d+)?([eE]\\d+)?$"},"minProperties":1},"ProviderLicenseUsage":{"description":"Provider usage (deployments) summary, price and cost during this window","type":"object","properties":{"price_per_second_per_mb_of_ram":{"description":"Billable [`Price`] per second per megabyte of RAM consumed, or `None` if RAM usage is unmetered.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"default":null},"total_deployment_count":{"description":"The total count of active deployments owned by the grantee during this window","type":"integer","format":"uint64","minimum":0},"total_ram_mb_seconds":{"description":"The total megabyte-seconds of RAM allocated to all deployments owned by the grantee during this window","type":"integer","format":"uint64","minimum":0},"gpus":{"description":"Provider GPU usage (of deployments) summary, price and cost per GPU type during this window","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderGpuLicenseUsage"}},"total_deployments_cost":{"description":"The total price of active deployments (including from GPUs) owned by the grantee during this window","anyOf":[{"$ref":"#/components/schemas/PriceTable"},{"type":"null"}]},"total_ram_mb_seconds_cost":{"description":"The total cost of the of the RAM allocated to all deployments owned by the grantee during this window","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}},"required":["total_deployment_count","total_ram_mb_seconds","gpus"]},"ProviderGpuLicenseUsage":{"description":"GPU-specific usage, pricing, and cost for a provider during a usage window.","type":"object","properties":{"total_gpu_count":{"description":"The total count of GPUs of this type allocated to all deployments owned by the grantee during this window","type":"integer","format":"uint64","minimum":0},"total_vram_mb_seconds":{"description":"The total megabyte-seconds of VRAM allocated to GPUs of this type to all deployments owned by the grantee during this window","type":"integer","format":"uint64","minimum":0},"total_vram_mb_seconds_cost":{"description":"The total cost of the VRAM allocated to GPUs of this type to all deployments owned by the grantee during this window","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}},"required":["total_gpu_count","total_vram_mb_seconds"],"oneOf":[{"description":"No charge for VRAM; used when GPU access is included in a flat subscription or during trial periods.","type":"object","properties":{"price_type":{"type":"string","const":"None"}},"required":["price_type"]},{"description":"Constant per-second cost per megabyte of VRAM, regardless of total allocation size.","type":"object","properties":{"price_per_second_per_mb_of_vram":{"description":"Fixed [`Price`] charged per second for each megabyte of VRAM allocated.","allOf":[{"$ref":"#/components/schemas/Price"}]},"price_type":{"type":"string","const":"Flat"}},"required":["price_type","price_per_second_per_mb_of_vram"]},{"description":"Per-MB cost interpolates linearly between a base price (at zero VRAM) and a reference price (at `reference_vram_mb`); larger allocations saturate at the reference price.","type":"object","properties":{"base_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM when allocation approaches zero.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM at and above `reference_vram_mb`.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_vram_mb":{"description":"VRAM size in megabytes at which the per-MB rate reaches the reference price; allocations above this are capped at that rate.","type":"integer","format":"uint32","minimum":0},"price_type":{"type":"string","const":"Linear"}},"required":["price_type","base_price_per_second_per_mb_of_vram","reference_price_per_second_per_mb_of_vram","reference_vram_mb"]},{"description":"Per-MB cost interpolates logarithmically: the per-MB rate equals the base price at `reference_vram_mb / 10` (and below) and the reference price at `reference_vram_mb` (and above).","type":"object","properties":{"base_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM at and below `reference_vram_mb / 10`.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_price_per_second_per_mb_of_vram":{"description":"[`Price`] per second per megabyte of VRAM at and above `reference_vram_mb`.","allOf":[{"$ref":"#/components/schemas/Price"}]},"reference_vram_mb":{"description":"VRAM size in megabytes at which the per-MB rate reaches the reference price; allocations above this are capped at that rate.","type":"integer","format":"uint32","minimum":0},"price_type":{"type":"string","const":"Logarithmic"}},"required":["price_type","base_price_per_second_per_mb_of_vram","reference_price_per_second_per_mb_of_vram","reference_vram_mb"]}]},"SubscriptionLicenseUsage":{"description":"Subscription usage (active intervals) summary, price and cost during this window","type":"object","properties":{"price_per_subscription":{"description":"The license's recurring price charged per subscription, or `None` if the license has no base price.","anyOf":[{"$ref":"#/components/schemas/LicenseBasePrice"},{"type":"null"}]},"total_subscriptions_cost":{"description":"The sum of the costs of all subscription intervals in this window, or `None` if the license has no base price or no subscription was active.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]},"subscriptions":{"description":"The active interval and cost of every subscription that was active at some point during this window, keyed by subscription id and ordered by interval start.","type":"object","additionalProperties":{"$ref":"#/components/schemas/SubscriptionUsage"}}},"required":["subscriptions"]},"SubscriptionUsage":{"description":"The active interval of a single subscription clamped to a usage window, and its cost","type":"object","properties":{"datetime_gte":{"description":"The inclusive start of the active interval: the subscription's creation or the start of the window, whichever is later.","type":"string","format":"date-time"},"datetime_lt":{"description":"The exclusive end of the active interval: the subscription's cancellation or deletion, or the end of the window, whichever is earliest.","type":"string","format":"date-time"},"cost":{"description":"The price per subscription prorated over this interval against the price period that contains the start of the window, or `None` if the license has no base price.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}},"required":["datetime_gte","datetime_lt"]},"LicenseAndTenantIdPath":{"type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"},"tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["license_id","tenant_id"]},"GranteeLicenseUsage":{"description":"Represents the usage summary, price and cost for a license grantee during a given window","type":"object","properties":{"license_id":{"description":"Identifier of the license used","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Identifier of the grantee tenant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"datetime_gte":{"description":"The inclusive start time of this usage window","type":"string","format":"date-time"},"datetime_lt":{"description":"The exclusive end time of this usage window","type":"string","format":"date-time"},"model_usage":{"description":"Model usage (requests) summary, price and cost during this window","type":"object","additionalProperties":{"$ref":"#/components/schemas/ModelLicenseUsage"}},"provider_usage":{"description":"Provider usage (deployments) summary, price and cost during this window","type":"object","additionalProperties":{"$ref":"#/components/schemas/ProviderLicenseUsage"}},"subscription_usage":{"description":"Subscription usage (active intervals) summary, price and cost during this window","allOf":[{"$ref":"#/components/schemas/SubscriptionLicenseUsage"}]}},"required":["license_id","tenant_id","datetime_gte","datetime_lt","model_usage","provider_usage","subscription_usage"]},"LicenseGrantDeletion":{"description":"Result of deleting a single license grant.","type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"},"tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["license_id","tenant_id"]},"Subscription":{"description":"A tenant's subscription to a granted license.","type":"object","properties":{"id":{"description":"The unique identifier of this subscription.","allOf":[{"$ref":"#/components/schemas/SubscriptionId"}]},"license_id":{"description":"The license this subscription is against.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"The tenant that owns this subscription.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"created":{"description":"Timestamp when this subscription was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, or `None` if never modified after creation.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when this subscription was soft-deleted, or `None` if still present.","type":["string","null"],"format":"date-time"},"cancellation":{"description":"A pending or effected cancellation requested by the subscribing tenant.","anyOf":[{"$ref":"#/components/schemas/SubscriptionCancellation"},{"type":"null"}],"default":null},"cancelled":{"description":"Timestamp when the cancellation took effect, or `None` if not yet cancelled.","type":["string","null"],"format":"date-time","default":null}},"required":["id","license_id","tenant_id","created"]},"SubscriptionId":{"description":"SubscriptionId\n(Uuid)","type":"string","format":"uuid"},"SubscriptionCancellation":{"description":"A cancellation requested by the subscribing tenant.","type":"object","properties":{"requested":{"description":"Timestamp when the cancellation was requested.","type":"string","format":"date-time"},"to_be_cancelled":{"description":"Timestamp when the cancellation went or will go into effect.","type":"string","format":"date-time"}},"required":["requested","to_be_cancelled"]},"CreateSubscriptionBody":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/TenantId"},"quantity":{"description":"Number of subscriptions to create, all or nothing (at most 1000). They share\none creation timestamp and the response is the first of them. Defaults to 1.","type":"integer","format":"uint32","minimum":1,"maximum":1000,"default":1}},"required":["tenant_id"]},"LicenseCostProjection":{"description":"Projected monthly base-price cost for all grantees of a license.","type":"object","properties":{"license_id":{"description":"Identifier of the license.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"month_start":{"description":"Start of the current month.","type":"string","format":"date-time"},"month_end":{"description":"End of the current month.","type":"string","format":"date-time"},"per_grantee":{"description":"Projected cost per grantee tenant.","type":"object","additionalProperties":{"$ref":"#/components/schemas/GranteeLicenseCostProjection"}},"total_projected_base_price_cost":{"description":"Sum of all grantee projected costs, or `None` if no base price is set.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}},"required":["license_id","month_start","month_end","per_grantee"]},"GranteeLicenseCostProjection":{"description":"Projected monthly base-price cost for a single grantee of a license.","type":"object","properties":{"license_id":{"description":"Identifier of the license.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Identifier of the grantee tenant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"month_start":{"description":"Start of the current month.","type":"string","format":"date-time"},"month_end":{"description":"End of the current month.","type":"string","format":"date-time"},"active_seconds_so_far":{"description":"Seconds the grant was active so far this month.","type":"integer","format":"uint64","minimum":0},"projected_active_seconds":{"description":"Projected total active seconds for the full month (includes remaining if currently active).","type":"integer","format":"uint64","minimum":0},"projected_base_price_cost":{"description":"Projected base-price cost for the full month, or `None` if no base price is set.","anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]}},"required":["license_id","tenant_id","month_start","month_end","active_seconds_so_far","projected_active_seconds"]},"LicenseIdPath2":{"type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"}},"required":["license_id"]},"CreateLicenseDeprecationBody":{"type":"object","properties":{"target_license_id":{"anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}]},"deprecate_at":{"type":"string","format":"date-time"},"description":{"anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]}},"required":["deprecate_at"]},"UpdateLicenseDeprecationBody":{"type":"object","properties":{"deprecate_at":{"type":"string","format":"date-time"},"description":{"anyOf":[{"$ref":"#/components/schemas/Description"},{"type":"null"}]}},"required":["deprecate_at"]},"LicenseDeprecationDeletion":{"description":"Result of cancelling (soft-deleting) a license deprecation.","type":"object","properties":{"license_id":{"$ref":"#/components/schemas/LicenseId"}},"required":["license_id"]},"ApiKey":{"description":"Represents an API key in the inference system.\n\nAPI keys are used to authenticate requests and contain authorization\ninformation including role, allowed models/aliases, IP restrictions,\nand expiration settings.","type":"object","properties":{"id":{"description":"Unique identifier for the API key.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"tenant_id":{"description":"The tenant that owns this API key.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"role":{"description":"The role and permission level of this API key.","allOf":[{"$ref":"#/components/schemas/ApiKeyRole"}]},"display_name":{"description":"Human-readable display name for the API key.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"cidrs":{"description":"Optional list of CIDR blocks restricting where this key can be used from.\n\nIf empty, the key can be used from any IP address.","type":"array","items":{"$ref":"#/components/schemas/IpNet"},"default":[]},"expires":{"description":"Optional expiration timestamp for the API key.\n\nIf set, the key becomes invalid after this time.","type":["string","null"],"format":"date-time","default":null},"required_headers":{"description":"Required HTTP headers that must be present in requests using this key.\n\nUsed for additional security constraints. Keys must be 1–255 chars, values at most 4096 chars.","type":"object","additionalProperties":{"type":"string"},"default":{}},"model_access":{"description":"Defines which models this API key can access.","default":{"include":"All","except":[]},"allOf":[{"$ref":"#/components/schemas/ApiKeyModelAccess"}]},"alias_access":{"description":"Defines which aliases this API key can access.","default":{"include":"All","except":[]},"allOf":[{"$ref":"#/components/schemas/ApiKeyAliasAccess"}]},"tags":{"description":"Optional tags for categorizing and filtering API keys.","type":"array","items":{"$ref":"#/components/schemas/Tag"},"default":[]},"max_cost":{"description":"Optional self-imposed cost quota for this API key. The base price of any license does not count toward this.","anyOf":[{"$ref":"#/components/schemas/SelfCostQuota"},{"type":"null"}],"default":null},"allow_queue_priority":{"description":"Whether requests made with this key may ask to skip ahead in a concurrency queue.\n\nOff by default, and deliberately per-key rather than per-tenant: priority is only\nmeaningful if most callers cannot claim it, so granting it is an explicit act. A request\nfrom a key without this set is queued at the default priority even if it asks for one.","type":"boolean","default":false},"created":{"description":"Timestamp when the API key was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the API key was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"}},"required":["id","tenant_id","role","display_name","created"]},"ApiKeyRole":{"description":"Role of an API key defining its permission level.","oneOf":[{"description":"Full system administrator access.","type":"string","const":"SystemAdminFull"},{"description":"Read-only system administrator access.","type":"string","const":"SystemAdminRead"},{"description":"Full tenant administrator access.","type":"string","const":"TenantAdminFull"},{"description":"Read-only tenant administrator access.","type":"string","const":"TenantAdminRead"},{"description":"Regular tenant user access (default).","type":"string","const":"TenantUser"}]},"IpNet":{"title":"IP network","description":"An IPv4 or IPv6 address with prefix length","examples":["192.168.0.0/24","fd00::/32"],"oneOf":[{"$ref":"#/components/schemas/Ipv4Net"},{"$ref":"#/components/schemas/Ipv6Net"}]},"Ipv4Net":{"title":"IPv4 network","description":"An IPv4 address with prefix length","type":"string","examples":["0.0.0.0/0","192.168.0.0/24"],"maxLength":18,"pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(?:3[0-2]|[1-2][0-9]|[0-9])$"},"Ipv6Net":{"title":"IPv6 network","description":"An IPv6 address with prefix length","type":"string","examples":["::/0","fd00::/32"],"maxLength":43,"pattern":"^[0-9A-Fa-f:\\.]+\\/(?:[0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])$"},"ApiKeyModelAccess":{"description":"Access control for models.\n\nDefines which models an API key can access using an allow/deny pattern.","allOf":[{"$ref":"#/components/schemas/ApiKeyAccess"}]},"ApiKeyAccess":{"description":"Generic access control pattern.\n\nSupports both allowlist and denylist patterns with exceptions.","oneOf":[{"description":"Allow all items except those in the exception list.","type":"object","properties":{"except":{"description":"Items to exclude from access.","type":"array","items":{"$ref":"#/components/schemas/ModelId"}},"include":{"type":"string","const":"All"}},"required":["include"]},{"description":"Deny all items except those in the exception list.","type":"object","properties":{"except":{"description":"Items to allow despite the default deny.","type":"array","items":{"$ref":"#/components/schemas/ModelId"}},"include":{"type":"string","const":"None"}},"required":["include"]}]},"ApiKeyAliasAccess":{"description":"Access control for aliases.\n\nDefines which aliases an API key can access using an allow/deny pattern.","allOf":[{"$ref":"#/components/schemas/ApiKeyAccess2"}]},"ApiKeyAccess2":{"description":"Generic access control pattern.\n\nSupports both allowlist and denylist patterns with exceptions.","oneOf":[{"description":"Allow all items except those in the exception list.","type":"object","properties":{"except":{"description":"Items to exclude from access.","type":"array","items":{"$ref":"#/components/schemas/AliasId"}},"include":{"type":"string","const":"All"}},"required":["include"]},{"description":"Deny all items except those in the exception list.","type":"object","properties":{"except":{"description":"Items to allow despite the default deny.","type":"array","items":{"$ref":"#/components/schemas/AliasId"}},"include":{"type":"string","const":"None"}},"required":["include"]}]},"Tag":{"type":"string","minLength":1,"maxLength":255},"ApiKeyData":{"description":"Mutable data for an API key.\n\nThis struct contains the fields that can be modified after API key creation.","type":"object","properties":{"role":{"description":"The role and permission level of this API key.","allOf":[{"$ref":"#/components/schemas/ApiKeyRole"}]},"display_name":{"description":"Human-readable display name for the API key.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"cidrs":{"description":"Optional list of CIDR blocks restricting where this key can be used from.\n\nIf empty, the key can be used from any IP address.","type":"array","items":{"$ref":"#/components/schemas/IpNet"},"default":[]},"expires":{"description":"Optional expiration timestamp for the API key.\n\nIf set, the key becomes invalid after this time.","type":["string","null"],"format":"date-time","default":null},"required_headers":{"description":"Required HTTP headers that must be present in requests using this key.\n\nUsed for additional security constraints. Keys must be 1–255 chars, values at most 4096 chars.","type":"object","additionalProperties":{"type":"string"},"default":{}},"model_access":{"description":"Defines which models this API key can access.","default":{"include":"All","except":[]},"allOf":[{"$ref":"#/components/schemas/ApiKeyModelAccess"}]},"alias_access":{"description":"Defines which aliases this API key can access.","default":{"include":"All","except":[]},"allOf":[{"$ref":"#/components/schemas/ApiKeyAliasAccess"}]},"tags":{"description":"Optional tags for categorizing and filtering API keys.","type":"array","items":{"$ref":"#/components/schemas/Tag"},"default":[]},"max_cost":{"description":"Optional self-imposed cost quota for this API key. The base price of any license does not count toward this.","anyOf":[{"$ref":"#/components/schemas/SelfCostQuota"},{"type":"null"}],"default":null},"allow_queue_priority":{"description":"Whether requests made with this key may ask to skip ahead in a concurrency queue.\n\nOff by default, and deliberately per-key rather than per-tenant: priority is only\nmeaningful if most callers cannot claim it, so granting it is an explicit act. A request\nfrom a key without this set is queued at the default priority even if it asks for one.","type":"boolean","default":false}},"required":["role","display_name"]},"ApiKeyWithAccessToken":{"description":"API key with its access token.\n\nThis type is returned when creating or rotating an API key, as the\naccess token is only available at creation/rotation time.","type":"object","properties":{"id":{"description":"Unique identifier for the API key.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"tenant_id":{"description":"The tenant that owns this API key.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"role":{"description":"The role and permission level of this API key.","allOf":[{"$ref":"#/components/schemas/ApiKeyRole"}]},"display_name":{"description":"Human-readable display name for the API key.","allOf":[{"$ref":"#/components/schemas/DisplayName"}]},"cidrs":{"description":"Optional list of CIDR blocks restricting where this key can be used from.\n\nIf empty, the key can be used from any IP address.","type":"array","items":{"$ref":"#/components/schemas/IpNet"},"default":[]},"expires":{"description":"Optional expiration timestamp for the API key.\n\nIf set, the key becomes invalid after this time.","type":["string","null"],"format":"date-time","default":null},"required_headers":{"description":"Required HTTP headers that must be present in requests using this key.\n\nUsed for additional security constraints. Keys must be 1–255 chars, values at most 4096 chars.","type":"object","additionalProperties":{"type":"string"},"default":{}},"model_access":{"description":"Defines which models this API key can access.","default":{"include":"All","except":[]},"allOf":[{"$ref":"#/components/schemas/ApiKeyModelAccess"}]},"alias_access":{"description":"Defines which aliases this API key can access.","default":{"include":"All","except":[]},"allOf":[{"$ref":"#/components/schemas/ApiKeyAliasAccess"}]},"tags":{"description":"Optional tags for categorizing and filtering API keys.","type":"array","items":{"$ref":"#/components/schemas/Tag"},"default":[]},"max_cost":{"description":"Optional self-imposed cost quota for this API key. The base price of any license does not count toward this.","anyOf":[{"$ref":"#/components/schemas/SelfCostQuota"},{"type":"null"}],"default":null},"allow_queue_priority":{"description":"Whether requests made with this key may ask to skip ahead in a concurrency queue.\n\nOff by default, and deliberately per-key rather than per-tenant: priority is only\nmeaningful if most callers cannot claim it, so granting it is an explicit act. A request\nfrom a key without this set is queued at the default priority even if it asks for one.","type":"boolean","default":false},"created":{"description":"Timestamp when the API key was created.","type":"string","format":"date-time"},"updated":{"description":"Timestamp of the last update, if any.","type":["string","null"],"format":"date-time"},"deleted":{"description":"Timestamp when the API key was soft-deleted, if deleted.","type":["string","null"],"format":"date-time"},"access_token":{"description":"The secret access token used for authentication.\n\nThis token is encrypted at rest in the database.","type":"string"}},"required":["id","tenant_id","role","display_name","created","access_token"]},"ApiKeyIdPath":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/ApiKeyId"}},"required":["api_key_id"]},"ApiKeyAccessibleModel":{"description":"A model accessible via an API key, with metadata about how it was resolved.","type":"object","properties":{"model":{"description":"The model entity.","allOf":[{"$ref":"#/components/schemas/Model"}]},"license_id":{"description":"License granting access, if any.","anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}]},"overriden_by_alias_id":{"description":"Alias that overrides this model's name, if any.","anyOf":[{"$ref":"#/components/schemas/AliasId"},{"type":"null"}]},"overriden_by_model_id":{"description":"Model that overrides this model's name, if any.","anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}]},"name_type":{"description":"How the model was accessed (by alias name or model name).","allOf":[{"$ref":"#/components/schemas/AccessibleThroughNameType"}]},"name":{"description":"The name used to access this model.","type":"string"},"alias_id":{"description":"Alias ID if accessed through an alias.","anyOf":[{"$ref":"#/components/schemas/AliasId"},{"type":"null"}]}},"required":["model","name_type","name"]},"AccessibleThroughNameType":{"description":"How a model is accessed through an API key.","oneOf":[{"description":"Accessed via an alias name.","type":"string","const":"AliasName"},{"description":"Accessed via the model's own name.","type":"string","const":"ModelName"}]},"LicenseFilterQuery":{"type":"object","properties":{"license_id":{"anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}]}}},"SubscriptionIdPath":{"type":"object","properties":{"subscription_id":{"$ref":"#/components/schemas/SubscriptionId"}},"required":["subscription_id"]},"SubscriptionIds":{"description":"Subscriptions to act on, all or nothing: distinct ids of subscriptions that\nbelong to one license and one tenant, all written with the same timestamp.","type":"array","items":{"$ref":"#/components/schemas/SubscriptionId"},"minItems":1,"maxItems":1000},"RequestListFilter":{"description":"Narrows which of a tenant's requests are listed.\n\nKept apart from [`RequestFilter`], which narrows the usage aggregations: status and model type\nonly apply to listing, and folding them into that type would leave every aggregation silently\nignoring them. Every field is optional and the set ones are combined, so all `None` lists\neverything the tenant ran.","type":"object","properties":{"api_key_id":{"description":"List only requests authenticated by this API key.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}]},"model_id":{"description":"List only requests targeting this model.","anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}]},"model_type":{"description":"List only requests targeting a model of this type.","anyOf":[{"$ref":"#/components/schemas/ModelTypeName"},{"type":"null"}]},"status":{"description":"List only requests that reached this stage of their lifecycle.","anyOf":[{"$ref":"#/components/schemas/RequestStatus"},{"type":"null"}]}}},"ModelTypeName":{"description":"Discriminant-only variant of [`ModelType`](crate::models::model::ModelType), used as a key\nwhen limits are scoped to all models of a given type.","oneOf":[{"description":"Chat / completion model.","type":"string","const":"Chat"},{"description":"Text embedding model.","type":"string","const":"Embedding"},{"description":"Re-ranking model.","type":"string","const":"Reranking"},{"description":"Speech-to-text model.","type":"string","const":"SpeechToText"},{"description":"Text-to-speech model.","type":"string","const":"TextToSpeech"},{"description":"Image generation model.","type":"string","const":"Image"},{"description":"Unknown / not yet classified.","type":"string","const":"Unknown"}]},"RequestStatus":{"description":"Discriminant-only form of [`RequestData`]: which stage of its lifecycle a request reached,\nwithout the details each stage carries.\n\nSerializes to the same names as `RequestData`'s `\"status\"` tag, so a filter value matches what a\nlisted request reports.","oneOf":[{"description":"Admitted and still running.","type":"string","const":"Pending"},{"description":"Finished normally.","type":"string","const":"Completed"},{"description":"The client went away before it finished.","type":"string","const":"Aborted"},{"description":"Failed, upstream or in the gateway.","type":"string","const":"Error"}]},"PaginationQuery":{"type":"object","properties":{"limit":{"type":["integer","null"],"format":"uint32","minimum":0,"default":100},"offset":{"type":["integer","null"],"format":"uint32","minimum":0,"default":0}}},"Request":{"description":"Single inference request routed through AI Inference.\n\nCaptures the full lifecycle of an inference call—from creation through\ncompletion, abort, or error—along with the tenant, model, and billing\ncontext (API key, license) associated with the call.","type":"object","properties":{"id":{"description":"Unique identifier for this inference request.","allOf":[{"$ref":"#/components/schemas/RequestId"}]},"tenant_id":{"description":"[`TenantId`] of the tenant that owns this request.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"model_id":{"description":"[`ModelId`] of the model targeted by this request.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"alias_id":{"description":"[`AliasId`] used to route the request, or `None` if the model was addressed directly.","anyOf":[{"$ref":"#/components/schemas/AliasId"},{"type":"null"}]},"api_key_id":{"description":"[`ApiKeyId`] that authenticated the request, or `None` for internally-initiated calls.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}]},"license_id":{"description":"[`LicenseId`] charged for this request, or `None` if no license applies.","anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}]},"created":{"description":"Timestamp when the request was received by the inference service.","type":"string","format":"date-time"},"max_queue_position":{"description":"Deepest position this request ever held in a concurrency queue before it was admitted,\ncounting from 1 at the head, or `None` if it never had to queue.\n\nRecorded once, at admission. Under plain first-come-first-served a waiter only ever moves\nforward, so this is simply the position it joined at; the \"max\" framing is what keeps the\nfield meaningful once a waiter can be overtaken.\n\nA request blocked by several scopes at once holds a position in each; the one recorded is\nthe worst of them, since that is the line that actually governed how long it waited.","type":["integer","null"],"format":"uint32","minimum":0,"default":null},"node_id":{"description":"Inference process that owns this request, or `None` for rows written before it was recorded.","anyOf":[{"$ref":"#/components/schemas/NodeId"},{"type":"null"}],"default":null},"queued_at":{"description":"When this request joined a concurrency queue, or `None` if it never had to wait.\n\n`created`/`requested` mark the end of any wait, since the request row is only written once\nthe request has been let through. The two together give how long this request waited, and\nacross requests, how many were waiting at any given moment.","type":["string","null"],"format":"date-time","default":null},"priority":{"description":"The effective queue priority this request was admitted with, or `None` for requests that\nnever went through the admission pipeline (no license) or were recorded before the field\nexisted.","anyOf":[{"$ref":"#/components/schemas/QueuePriority"},{"type":"null"}],"default":null}},"required":["id","tenant_id","model_id","created"],"oneOf":[{"description":"Request is queued and awaiting inference; transitions to Completed, Aborted, or Error once processing finishes.","type":"object","properties":{"requested":{"description":"Timestamp when inference was requested.","type":"string","format":"date-time"},"status":{"type":"string","const":"Pending"}},"required":["status","requested"]},{"description":"Inference finished successfully with full token usage available.","type":"object","properties":{"requested":{"description":"Timestamp when inference was requested.","type":"string","format":"date-time"},"started":{"description":"Timestamp when inference started. Usually reflects when the first token was streamed to the inference service. Not available for all request types.","type":["string","null"],"format":"date-time"},"finished":{"description":"Timestamp when inference completed.","type":"string","format":"date-time"},"usage":{"description":"Token and audio usage consumed by this request.","allOf":[{"$ref":"#/components/schemas/RequestUsage"}]},"provider_request_id":{"description":"Upstream provider's own request identifier, or `None` if the provider did not return one.","type":["string","null"]},"status":{"type":"string","const":"Completed"}},"required":["status","requested","finished","usage"]},{"description":"Request was intentionally cancelled before completion; partial usage may be available.","type":"object","properties":{"requested":{"description":"Timestamp when inference was requested.","type":"string","format":"date-time"},"started":{"description":"Timestamp when inference started. Usually reflects when the first token was streamed to the inference service. Not available for all request types.","type":["string","null"],"format":"date-time"},"finished":{"description":"Timestamp when the request was aborted.","type":"string","format":"date-time"},"usage":{"description":"Partial token usage up to the point of cancellation, or `None` if unavailable.","anyOf":[{"$ref":"#/components/schemas/RequestUsage"},{"type":"null"}]},"provider_request_id":{"description":"Upstream provider's own request identifier, or `None` if the provider did not return one.","type":["string","null"]},"status":{"type":"string","const":"Aborted"}},"required":["status","requested","finished"]},{"description":"Inference failed due to a provider or inference service error; partial usage may be available.","type":"object","properties":{"requested":{"description":"Timestamp when inference was requested.","type":"string","format":"date-time"},"started":{"description":"Timestamp when inference started. Usually reflects when the first token was streamed to the inference service. Not available for all request types.","type":["string","null"],"format":"date-time"},"finished":{"description":"Timestamp when the error was recorded.","type":"string","format":"date-time"},"error":{"description":"Human-readable error message describing the failure.","type":"string"},"usage":{"description":"Partial token usage consumed before the error, or `None` if unavailable.","anyOf":[{"$ref":"#/components/schemas/RequestUsage"},{"type":"null"}]},"provider_request_id":{"description":"Upstream provider's own request identifier, or `None` if the provider did not return one.","type":["string","null"]},"status":{"type":"string","const":"Error"}},"required":["status","requested","finished","error"]}]},"RequestId":{"description":"RequestId\n(Uuid)","type":"string","format":"uuid"},"RequestUsage":{"description":"Token and audio consumption for a single inference request.\n\nAll counters are cumulative for the request. Zero values indicate\nthat the corresponding modality was not used.","type":"object","properties":{"input_tokens":{"description":"Number of prompt/input tokens consumed.","type":"integer","format":"uint64","minimum":0},"cached_input_tokens":{"description":"How many of `input_tokens` the provider served from its prefix cache.\n\nPart of `input_tokens`, not in addition to them. `0` when the provider reported none,\nincluding providers that never report cached tokens.","type":"integer","format":"uint64","minimum":0,"default":0},"output_tokens":{"description":"Number of completion/output tokens generated.","type":"integer","format":"uint64","minimum":0},"input_audio_seconds":{"description":"Duration of input audio processed, in whole seconds.","type":"integer","format":"uint64","minimum":0}},"required":["input_tokens","output_tokens","input_audio_seconds"]},"NodeId":{"description":"NodeId\n(Uuid)","type":"string","format":"uuid"},"QueuePriority":{"description":"How far ahead of its arrival order a queued request may be placed.\n\nHigher wins: a request at 10 is served before one at 1 regardless of which arrived first.\nRequests that carry no priority sit at [`QueuePriority::DEFAULT`], so a caller that never asks\nfor one is ordered exactly as it was before priorities existed.\n\nThe range is deliberately small. It is a handful of bands to sort callers into, not a budget\nto spend, and a narrow range keeps it obvious that two requests one point apart are adjacent\nrather than meaningfully different.","type":"integer","format":"int16","minimum":-32768,"maximum":32767},"AggregationPath":{"type":"object","properties":{"aggregation":{"$ref":"#/components/schemas/Aggregation"}},"required":["aggregation"]},"RequestAggregationQuery":{"description":"Query parameters for the request aggregation series.\n\nThe datetime range is optional (defaulting to all time). The three filters are optional and\ncombine with AND logic, so setting both an api-key and a model counts only that key's\nrequests against that model.","type":"object","properties":{"datetime_gte":{"type":["string","null"],"format":"date-time","default":null},"datetime_lt":{"type":["string","null"],"format":"date-time","default":null},"api_key_id":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}],"default":null},"license_id":{"anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}],"default":null},"model_id":{"anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}],"default":null},"priority_gte":{"anyOf":[{"$ref":"#/components/schemas/QueuePriority"},{"type":"null"}],"default":null}}},"RequestAggregation":{"description":"A tenant's requests rolled up into time windows at a given [`Aggregation`] granularity.","type":"object","properties":{"aggregation":{"description":"The time granularity each window represents.","allOf":[{"$ref":"#/components/schemas/Aggregation"}]},"windows":{"description":"Per-window metrics, keyed by the window's start timestamp.","type":"object","additionalProperties":{"$ref":"#/components/schemas/RequestAggregationWindow"}}},"required":["aggregation","windows"]},"RequestAggregationWindow":{"description":"Aggregated request metrics for a single time window, split by terminal status.","type":"object","properties":{"finished":{"description":"Metrics for successfully completed requests, or `None` if there were none.","anyOf":[{"$ref":"#/components/schemas/RequestAggregationWindowStatus"},{"type":"null"}]},"aborted":{"description":"Metrics for aborted requests, or `None` if there were none.","anyOf":[{"$ref":"#/components/schemas/RequestAggregationWindowStatus"},{"type":"null"}]},"error":{"description":"Metrics for errored requests, or `None` if there were none.","anyOf":[{"$ref":"#/components/schemas/RequestAggregationWindowStatus"},{"type":"null"}]}}},"RequestAggregationWindowStatus":{"description":"Aggregated metrics for all requests of a single status within one time window.","type":"object","properties":{"count":{"description":"Number of requests with this status in the window.","type":"integer","format":"uint32","minimum":0},"input_tokens":{"description":"Sum of input tokens across these requests, or `None` if none reported any.","type":["integer","null"],"format":"uint64","minimum":0},"cached_input_tokens":{"description":"How many of `input_tokens` the provider served from its prefix cache, or `None` if none\nwere.","type":["integer","null"],"format":"uint64","minimum":0},"output_tokens":{"description":"Sum of output tokens across these requests, or `None` if none reported any.","type":["integer","null"],"format":"uint64","minimum":0},"input_audio_seconds":{"description":"Sum of input audio seconds across these requests, or `None` if none reported any.","type":["integer","null"],"format":"uint64","minimum":0},"duration_avg":{"description":"Average total request duration (from `requested` until `finished`) across the window.\n\nCovers the full lifecycle: queue wait + time to first token + generation. Contrast with\n`latency_avg` which only measures up to the first token.","anyOf":[{"$ref":"#/components/schemas/Duration"},{"type":"null"}]},"latency_avg":{"description":"Average time to first token (TTFT) across the window: the interval from `requested`\n(when the gateway received the request) until `started` (when the first token arrived\nfrom the provider), queue time included.\n\nThis is *not* the same as total request duration (`duration_avg`), which runs until\n`finished`. Embeddings and other non-streaming requests have no `started` timestamp\nand are excluded from this average.","anyOf":[{"$ref":"#/components/schemas/Duration"},{"type":"null"}]},"tps_avg":{"description":"Average output tokens per second across the requests in this window, or `None` if none\ncould be measured.\n\nMeasured per request from `started` to `finished` — the span tokens were actually being\nproduced — and then averaged. Timing from `requested` instead would fold the queue wait\nand the time to first token into the rate, so a request that waited ten seconds before\ngenerating quickly would read as slow.\n\nThis is a mean of rates, so every request counts equally regardless of size: one request\nreturning five tokens weighs the same as one returning five thousand. It answers \"how fast\nwas a typical request\", not \"what throughput did this tenant achieve\".\n\nThat weighting makes it sensitive to very short requests. A single token returned in a\nmillisecond is a thousand tokens per second by arithmetic, and averaged equally against\nreal generations it will dominate the window. Treat an implausibly high value as a sign of\ntrivial responses rather than fast ones.\n\nRequests that never reported a start, or that began and finished within the same instant,\nare left out rather than counted as zero.","type":["number","null"],"format":"double"}},"required":["count"]},"Duration":{"type":"object","properties":{"secs":{"type":"integer","format":"uint64","minimum":0},"nanos":{"type":"integer","format":"uint32","minimum":0}},"required":["secs","nanos"]},"RequestCostAggregation":{"description":"Per-window cost totals for plotting spend alongside the usage chart.\n\nEach window carries a [`PriceTable`] summing every currency the tenant incurred cost in.\nWindows with no licensed requests are absent from the map rather than present with a zero.","type":"object","properties":{"aggregation":{"description":"The time granularity each window represents.","allOf":[{"$ref":"#/components/schemas/Aggregation"}]},"windows":{"description":"Total cost per window, keyed by the window's start timestamp.","type":"object","additionalProperties":{"$ref":"#/components/schemas/PriceTable"}},"cached_input_tokens_cost":{"description":"The part of each window's total spent on cached input tokens, keyed like `windows`.\n\nKept beside `windows` rather than inside it so the totals keep their shape. A window is\nabsent when no input tokens in it were priced.","type":"object","additionalProperties":{"$ref":"#/components/schemas/PriceTable"},"default":{}}},"required":["aggregation","windows"]},"RequestModelAggregation":{"description":"A tenant's requests rolled up per model (not time-windowed), within a time range.\n\nEach entry reuses [`RequestAggregationWindow`] to carry the terminal-status counts and\ntiming for one model. Used to surface per-model request volume and success rate without\nfetching the full request list. Pending requests are excluded.","type":"object","properties":{"models":{"description":"Per-model metrics, keyed by [`ModelId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/RequestAggregationWindow"}}},"required":["models"]},"RequestApiKeyAggregation":{"description":"A tenant's requests rolled up per API key (not time-windowed), within a time range.\n\nMirrors [`RequestModelAggregation`] but keyed by [`ApiKeyId`]. Requests not attributed to\nan API key (internally-initiated calls) and pending requests are excluded.","type":"object","properties":{"api_keys":{"description":"Per-API-key metrics, keyed by [`ApiKeyId`].","type":"object","additionalProperties":{"$ref":"#/components/schemas/RequestAggregationWindow"}}},"required":["api_keys"]},"ConcurrencyQuery":{"description":"Query parameters for the peak-concurrency series.\n\nThe range is required here, unlike the other request endpoints: the response is one entry per\nwindow across the whole range, so an open-ended request has no well-defined size. The three\nfilters are optional and combine.","type":"object","properties":{"datetime_gte":{"description":"Start of the range, inclusive.","type":"string","format":"date-time"},"datetime_lt":{"description":"End of the range, exclusive.","type":"string","format":"date-time"},"api_key_id":{"description":"Count only requests authenticated by this API key.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}],"default":null},"license_id":{"description":"Count only requests charged to this license.","anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}],"default":null},"model_id":{"description":"Count only requests targeting this model.","anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}],"default":null},"priority_gte":{"description":"Count only requests whose effective priority was at least this value.","anyOf":[{"$ref":"#/components/schemas/QueuePriority"},{"type":"null"}],"default":null}},"required":["datetime_gte","datetime_lt"]},"ConcurrencyAggregation":{"description":"How many of a tenant's requests were in flight at once, per time window.\n\nUnlike the other aggregations here, this is not a total: a window's value is the *highest*\nnumber of requests that overlapped at any instant within it. A mean would flatten exactly the\nbursts that matter, since the question this answers is whether a tenant is pressing against a\nconcurrency cap.\n\nA request is counted from `requested` until it finishes, and one still running is counted up\nto the moment the series was computed. Windows in which nothing started or finished still\ncarry the level they inherited, so a single long request registers across every window it\nspans rather than only the two it touches.","type":"object","properties":{"aggregation":{"description":"The time granularity each window represents.","allOf":[{"$ref":"#/components/schemas/Aggregation"}]},"windows":{"description":"Peak in-flight request count per window, keyed by the window's start timestamp.","type":"object","additionalProperties":{"type":"integer","format":"uint32","minimum":0}},"queue":{"description":"Queueing metrics per window, keyed identically to `windows`.\n\nKept beside `windows` rather than folded into it so that adding queue metrics did not\nchange the shape of a response the dashboard already consumed.","type":"object","additionalProperties":{"$ref":"#/components/schemas/QueueWindow"},"default":{}}},"required":["aggregation","windows"]},"QueueWindow":{"description":"How much queueing happened within one time window.\n\nA request counts as queueing from the moment it joined a concurrency queue until it was let\nthrough, which is a different span from the one it then spends running.","type":"object","properties":{"peak_waiting":{"description":"The most requests waiting at any single instant within the window.\n\nReported alongside the mean because a mean flattens exactly the pile-ups worth seeing: a\nwindow averaging two waiting looks calm even if forty were waiting for part of it.","type":"integer","format":"uint32","minimum":0},"mean_waiting":{"description":"The average number waiting across the window, weighted by time.\n\nEquivalently, the total time requests spent waiting during the window divided by the\nwindow's length, so a request waiting half the window counts as half of one waiter.","type":"number","format":"double"},"mean_wait_seconds":{"description":"Mean seconds spent waiting, over the requests *admitted* during this window, or `None` if\nnone were admitted in it.\n\nAttributed to the window a request was admitted in rather than the one it joined in, so a\nlong wait shows up where it ended and cannot be double counted across windows.","type":["number","null"],"format":"double"}},"required":["peak_waiting","mean_waiting"]},"RequestIdPath":{"type":"object","properties":{"request_id":{"$ref":"#/components/schemas/RequestId"}},"required":["request_id"]},"AuditLogFilterQuery":{"type":"object","properties":{"action":{"description":"Filter by action name (e.g., \"List\", \"Create\", \"Get\", \"Update\", \"Delete\", \"Proxy\", \"Auth\", \"InferenceRequest\").","type":["string","null"],"default":null},"target":{"description":"Filter by target name (e.g., \"Tenant\", \"Model\", \"ApiKey\").","type":["string","null"],"default":null},"result":{"description":"Filter by result (e.g., \"Ok\", \"Error\", \"Unauthorized\", \"Unauthenticated\").","type":["string","null"],"default":null},"api_key_id":{"description":"Filter by the API key the caller authenticated with.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}],"default":null},"ip":{"description":"Filter by caller IP: a single address (e.g., \"203.0.113.7\") or a CIDR range\n(e.g., \"203.0.113.0/24\").","anyOf":[{"$ref":"#/components/schemas/IpFilter"},{"type":"null"}]}}},"IpFilter":{"description":"Caller IP to filter audit logs by.","anyOf":[{"description":"A CIDR range, matching every address inside it.","allOf":[{"$ref":"#/components/schemas/IpNet"}]},{"description":"A single address, matching only itself.","type":"string","format":"ip"}]},"AuditLog":{"description":"Immutable audit trail entry capturing a single system action or access attempt.\n\nEach entry records who performed the action ([`Credentials`] inside [`AuditLogResult`]),\nwhat was done ([`Action`]), and whether it succeeded ([`AuditLogResult`]).\nEntries are append-only and never updated after creation.","type":"object","properties":{"id":{"description":"Unique identifier for this audit log entry.","allOf":[{"$ref":"#/components/schemas/AuditLogId"}]},"created":{"description":"Timestamp when this audit log entry was recorded.","type":"string","format":"date-time"},"result":{"description":"Outcome of the logged operation, including credentials and any error message.","allOf":[{"$ref":"#/components/schemas/AuditLogResult"}]}},"required":["id","created","result"],"oneOf":[{"description":"Enumeration of multiple resources matching a filter scope.","type":"object","properties":{"action":{"type":"string","const":"List"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/List"}]},{"description":"Creation of a new resource.","type":"object","properties":{"action":{"type":"string","const":"Create"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/Create"}]},{"description":"Retrieval of a single resource by identifier.","type":"object","properties":{"action":{"type":"string","const":"Get"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/Get"}]},{"description":"Mutation of an existing resource's data fields.","type":"object","properties":{"action":{"type":"string","const":"Update"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/Update"}]},{"description":"Soft- or hard-deletion of an existing resource.","type":"object","properties":{"action":{"type":"string","const":"Delete"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/Delete"}]},{"description":"Proxy request to an external service (e.g., HuggingFace Hub API).","type":"object","properties":{"action":{"type":"string","const":"Proxy"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/Proxy"}]},{"description":"Authentication flow (e.g., OIDC authorization code, token exchange).","type":"object","properties":{"action":{"type":"string","const":"Auth"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/Auth"}]},{"description":"Inference request routing and logging.","type":"object","properties":{"action":{"type":"string","const":"InferenceRequest"}},"required":["action"],"allOf":[{"$ref":"#/components/schemas/InferenceRequest"}]}]},"AuditLogId":{"description":"AuditLogId\n(Uuid)","type":"string","format":"uuid"},"AuditLogResult":{"description":"Outcome of an audited operation, capturing authentication status, credentials, and errors.\n\nTagged as `result` in JSON. Each variant records the caller's identity (or IP\nfor unauthenticated requests) and an optional error message explaining failures.","oneOf":[{"description":"Request failed authentication; only the source IP is known because no valid credentials were presented.","type":"object","properties":{"ip":{"description":"Source IP address of the unauthenticated request.","type":"string","format":"ip"},"error":{"description":"Human-readable reason authentication failed (e.g., missing or malformed token).","type":"string"},"result":{"type":"string","const":"Unauthenticated"}},"required":["result","ip","error"]},{"description":"Caller authenticated but lacked permission for the requested action.","type":"object","properties":{"credentials":{"description":"Validated credentials of the caller who was denied access.","allOf":[{"$ref":"#/components/schemas/Credentials"}]},"error":{"description":"Human-readable reason authorization was denied (e.g., insufficient role).","type":"string"},"result":{"type":"string","const":"Unauthorized"}},"required":["result","credentials","error"]},{"description":"Operation completed successfully with valid credentials.","type":"object","properties":{"credentials":{"description":"Validated credentials of the caller who performed the action.","allOf":[{"$ref":"#/components/schemas/Credentials"}]},"result":{"type":"string","const":"Ok"}},"required":["result","credentials"]},{"description":"Operation failed after authentication and authorization due to a server-side or business-logic error.","type":"object","properties":{"credentials":{"description":"Validated credentials of the caller whose request failed.","allOf":[{"$ref":"#/components/schemas/Credentials"}]},"error":{"description":"Human-readable description of the error encountered during processing.","type":"string"},"result":{"type":"string","const":"Error"}},"required":["result","credentials","error"]}]},"Credentials":{"description":"Authentication credentials for inference access.\n\nSupports three authentication methods:\n- **ApiKey**: Bearer token authentication with role-based access\n- **Cli**: Local CLI user authentication (development/admin)\n- **Oidc**: OpenID Connect token authentication with JWT claims","oneOf":[{"description":"Bearer-token authentication tied to a specific [`ApiKeyId`] and [`ApiKeyRole`]; used for programmatic access from external clients.","type":"object","properties":{"ip":{"description":"Source IP address of the client that presented the API key.","type":"string","format":"ip"},"api_key_id":{"description":"Unique identifier of the API key used for authentication, linking back to the [`ApiKey`](crate::models::api_key::ApiKey) record.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"api_key_role":{"description":"Role granted by the API key, determining the scope of permitted operations.","allOf":[{"$ref":"#/components/schemas/ApiKeyRole"}]},"credentials_type":{"type":"string","const":"ApiKey"}},"required":["credentials_type","ip","api_key_id","api_key_role"]},{"description":"Local CLI session authentication; used during development or administrative tasks where the operator authenticates via the command-line tool.","type":"object","properties":{"ip":{"description":"Source IP address of the CLI client, typically a loopback address for local sessions.","type":"string","format":"ip"},"shell_user":{"description":"Operating-system username of the shell session that initiated the CLI request.","type":"string"},"credentials_type":{"type":"string","const":"Cli"}},"required":["credentials_type","ip","shell_user"]},{"description":"OpenID Connect token authentication; used when clients present a JWT issued by a trusted identity provider.","type":"object","properties":{"ip":{"description":"Source IP address of the client that presented the OIDC token.","type":"string","format":"ip"},"subject":{"description":"OIDC `sub` claim — the unique identifier for the authenticated user within the identity provider.","type":"string"},"issuer":{"description":"OIDC `iss` claim — the URL of the identity provider that issued the token.","type":"string"},"email":{"description":"OIDC `email` claim, if present in the token; `None` when the identity provider does not include an email claim.","type":["string","null"]},"issued_at":{"description":"OIDC `iat` claim — timestamp when the token was issued by the identity provider.","type":"string","format":"date-time"},"expires_at":{"description":"OIDC `exp` claim — timestamp after which the token must be rejected as expired.","type":"string","format":"date-time"},"role":{"description":"Application-level role extracted from the OIDC token claims, used for authorization decisions.","type":"string"},"credentials_type":{"type":"string","const":"Oidc"}},"required":["credentials_type","ip","subject","issuer","issued_at","expires_at","role"]}]},"List":{"description":"Specific resource type and scope for a list (enumeration) action.\n\nEach variant captures the parent-level identifier(s) used to scope the listing,\nenabling audit queries like \"who listed all models under this provider?\"","oneOf":[{"description":"All audit log entries, optionally filtered by time range or result.","type":"object","properties":{"target":{"type":"string","const":"AuditLogs"}},"required":["target"]},{"description":"All tenants visible to the caller.","type":"object","properties":{"target":{"type":"string","const":"Tenants"}},"required":["target"]},{"description":"Providers registered under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose providers are being listed.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Providers"}},"required":["target","tenant_id"]},{"description":"Models scoped to a tenant or a specific provider.","type":"object","properties":{"target":{"type":"string","const":"Models"}},"oneOf":[{"description":"Holds a [`TenantId`]; indicates the referenced entity is a Tenant.","type":"object","properties":{"target_id_type":{"type":"string","const":"Tenant"},"target_id":{"$ref":"#/components/schemas/TenantId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ProviderId`]; indicates the referenced entity is a Provider.","type":"object","properties":{"target_id_type":{"type":"string","const":"Provider"},"target_id":{"$ref":"#/components/schemas/ProviderId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Lifecycle events for a specific model's deployment or a named deployment.","type":"object","properties":{"target":{"type":"string","const":"DeploymentEvents"}},"oneOf":[{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`DeploymentId`]; indicates the referenced entity is a Deployment.","type":"object","properties":{"target_id_type":{"type":"string","const":"Deployment"},"target_id":{"$ref":"#/components/schemas/DeploymentId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Log output for a specific deployment.","type":"object","properties":{"deployment_id":{"description":"The deployment whose logs are being listed.","allOf":[{"$ref":"#/components/schemas/DeploymentId"}]},"target":{"type":"string","const":"DeploymentLogs"}},"required":["target","deployment_id"]},{"description":"Active deployments scoped to a tenant, provider, or model.","type":"object","properties":{"target":{"type":"string","const":"Deployments"}},"oneOf":[{"description":"Holds a [`TenantId`]; indicates the referenced entity is a Tenant.","type":"object","properties":{"target_id_type":{"type":"string","const":"Tenant"},"target_id":{"$ref":"#/components/schemas/TenantId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ProviderId`]; indicates the referenced entity is a Provider.","type":"object","properties":{"target_id_type":{"type":"string","const":"Provider"},"target_id":{"$ref":"#/components/schemas/ProviderId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Aggregated model-level usage metrics scoped to a tenant, provider, or model.","type":"object","properties":{"target":{"type":"string","const":"ModelUsage"}},"oneOf":[{"description":"Holds a [`TenantId`]; indicates the referenced entity is a Tenant.","type":"object","properties":{"target_id_type":{"type":"string","const":"Tenant"},"target_id":{"$ref":"#/components/schemas/TenantId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ProviderId`]; indicates the referenced entity is a Provider.","type":"object","properties":{"target_id_type":{"type":"string","const":"Provider"},"target_id":{"$ref":"#/components/schemas/ProviderId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Aggregated deployment-level usage metrics scoped to a tenant, provider, or model.","type":"object","properties":{"target":{"type":"string","const":"DeploymentUsage"}},"oneOf":[{"description":"Holds a [`TenantId`]; indicates the referenced entity is a Tenant.","type":"object","properties":{"target_id_type":{"type":"string","const":"Tenant"},"target_id":{"$ref":"#/components/schemas/TenantId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ProviderId`]; indicates the referenced entity is a Provider.","type":"object","properties":{"target_id_type":{"type":"string","const":"Provider"},"target_id":{"$ref":"#/components/schemas/ProviderId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Model aliases scoped to a tenant, provider, or model.","type":"object","properties":{"target":{"type":"string","const":"Aliases"}},"oneOf":[{"description":"Holds a [`TenantId`]; indicates the referenced entity is a Tenant.","type":"object","properties":{"target_id_type":{"type":"string","const":"Tenant"},"target_id":{"$ref":"#/components/schemas/TenantId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ProviderId`]; indicates the referenced entity is a Provider.","type":"object","properties":{"target_id_type":{"type":"string","const":"Provider"},"target_id":{"$ref":"#/components/schemas/ProviderId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Licenses owned by the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose licenses are being listed.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Licenses"}},"required":["target","tenant_id"]},{"description":"Grant associations for the specified license.","type":"object","properties":{"license_id":{"description":"License whose grants are being listed.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"LicenseGrants"}},"required":["target","license_id"]},{"description":"License usage data for all grantees during a given time period.","type":"object","properties":{"license_id":{"description":"License from where the usage data is being collected.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"LicenseUsage"}},"required":["target","license_id"]},{"description":"Subscriptions scoped either to a license (all its subscribers, owner view)\nor to a tenant (that tenant's own subscriptions across granted licenses).","type":"object","properties":{"target":{"type":"string","const":"Subscriptions"}},"oneOf":[{"description":"Holds a [`LicenseId`]; indicates the referenced entity is a License.","type":"object","properties":{"target_id_type":{"type":"string","const":"License"},"target_id":{"$ref":"#/components/schemas/LicenseId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`TenantId`]; indicates the referenced entity is a Tenant.","type":"object","properties":{"target_id_type":{"type":"string","const":"Tenant"},"target_id":{"$ref":"#/components/schemas/TenantId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"API keys belonging to the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose API keys are being listed.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"ApiKeys"}},"required":["target","tenant_id"]},{"description":"Models accessible to the specified API key.","type":"object","properties":{"api_key_id":{"description":"API key whose accessible models are being listed.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"target":{"type":"string","const":"ApiKeyAccessibleModels"}},"required":["target","api_key_id"]},{"description":"Inference requests recorded under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose requests are being listed.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Requests"}},"required":["target","tenant_id"]},{"description":"Notification email addresses registered under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose notification emails are being listed.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"NotificationEmails"}},"required":["target","tenant_id"]},{"description":"Webhook endpoints registered under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose webhooks are being listed.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Webhooks"}},"required":["target","tenant_id"]},{"description":"Real-time SSE notification stream for the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant whose notification stream is being subscribed to.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"NotificationStream"}},"required":["target","tenant_id"]}]},"Create":{"description":"Specific resource type and parent context for a create action.\n\nEach variant records which entity was created and under which parent,\nenabling audit filtering by resource hierarchy.","oneOf":[{"description":"New top-level tenant with no parent dependency.","type":"object","properties":{"target":{"type":"string","const":"Tenant"}},"required":["target"]},{"description":"New provider registered under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that will own the new provider.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Provider"}},"required":["target","tenant_id"]},{"description":"New model definition registered under the specified provider.","type":"object","properties":{"provider_id":{"description":"Provider that will own the new model.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"target":{"type":"string","const":"Model"}},"required":["target","provider_id"]},{"description":"New deployment instance created for the specified model.","type":"object","properties":{"model_id":{"description":"Model that the deployment will serve.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"Deployment"}},"required":["target","model_id"]},{"description":"New license created under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that will own the new license.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"License"}},"required":["target","tenant_id"]},{"description":"New grant associating a license with a tenant, enabling that tenant to use the license.","type":"object","properties":{"license_id":{"description":"License being granted.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Tenant receiving access through the grant.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"LicenseGrant"}},"required":["target","license_id","tenant_id"]},{"description":"New subscription to a granted license.","type":"object","properties":{"license_id":{"description":"License being subscribed to.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Tenant creating the subscription.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"quantity":{"description":"Number of subscriptions created by the request.","type":"integer","format":"uint32","minimum":0,"default":1},"target":{"type":"string","const":"Subscription"}},"required":["target","license_id","tenant_id"]},{"description":"New license deprecation, optionally migrating grantees to a target license.","type":"object","properties":{"license_id":{"description":"License being deprecated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target_license_id":{"description":"Optional target license that grantees may be migrated to.","anyOf":[{"$ref":"#/components/schemas/LicenseId"},{"type":"null"}]},"target":{"type":"string","const":"LicenseDeprecation"}},"required":["target","license_id"]},{"description":"New model deprecation, optionally retargeting aliases to a target model.","type":"object","properties":{"model_id":{"description":"Model being deprecated.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target_model_id":{"description":"Optional target model that aliases may be retargeted to.","anyOf":[{"$ref":"#/components/schemas/ModelId"},{"type":"null"}]},"target":{"type":"string","const":"ModelDeprecation"}},"required":["target","model_id"]},{"description":"New human-readable alias created under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that will own the new alias.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Alias"}},"required":["target","tenant_id"]},{"description":"New API key created under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that will own the new API key.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"ApiKey"}},"required":["target","tenant_id"]},{"description":"New notification email registered under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that will own the new notification email.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"NotificationEmail"}},"required":["target","tenant_id"]},{"description":"New webhook endpoint registered under the specified tenant.","type":"object","properties":{"tenant_id":{"description":"Tenant that will own the new webhook.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Webhook"}},"required":["target","tenant_id"]}]},"Get":{"description":"Specific resource type and identifier for a single-entity retrieval action.\n\nEach variant records the target entity and its lookup key. Optional IDs\n(e.g., `tenant_id: Option<TenantId>`) indicate that the caller's own\ncontext may be used when `None`.","oneOf":[{"description":"Retrieval of a single audit log entry by its identifier.","type":"object","properties":{"audit_log_id":{"description":"Identifier of the audit log entry to retrieve.","allOf":[{"$ref":"#/components/schemas/AuditLogId"}]},"target":{"type":"string","const":"AuditLog"}},"required":["target","audit_log_id"]},{"description":"Retrieval of a tenant; `None` resolves to the caller's own tenant.","type":"object","properties":{"tenant_id":{"description":"Identifier of the tenant to retrieve, or `None` to retrieve the caller's own tenant.","anyOf":[{"$ref":"#/components/schemas/TenantId"},{"type":"null"}]},"target":{"type":"string","const":"Tenant"}},"required":["target"]},{"description":"Retrieval of a provider by its identifier.","type":"object","properties":{"provider_id":{"description":"Identifier of the provider to retrieve.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"target":{"type":"string","const":"Provider"}},"required":["target","provider_id"]},{"description":"Retrieval of a model by its identifier.","type":"object","properties":{"model_id":{"description":"Identifier of the model to retrieve.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"Model"}},"required":["target","model_id"]},{"description":"Retrieval of a deployment by model or deployment identifier.","type":"object","properties":{"target":{"type":"string","const":"Deployment"}},"oneOf":[{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`DeploymentId`]; indicates the referenced entity is a Deployment.","type":"object","properties":{"target_id_type":{"type":"string","const":"Deployment"},"target_id":{"$ref":"#/components/schemas/DeploymentId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Retrieval of a license by its identifier.","type":"object","properties":{"license_id":{"description":"Identifier of the license to retrieve.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"License"}},"required":["target","license_id"]},{"description":"License usage data for a grantee during a given time period.","type":"object","properties":{"license_id":{"description":"License from where the usage data is being collected.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Grantee tenant  which usage data is being collected.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"LicenseUsage"}},"required":["target","license_id","tenant_id"]},{"description":"Retrieval of a license deprecation by license ID.","type":"object","properties":{"license_id":{"description":"License whose deprecation is being retrieved.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"LicenseDeprecation"}},"required":["target","license_id"]},{"description":"Retrieval of a model deprecation by model ID.","type":"object","properties":{"model_id":{"description":"Model whose deprecation is being retrieved.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"ModelDeprecation"}},"required":["target","model_id"]},{"description":"Retrieval of an alias by its identifier.","type":"object","properties":{"alias_id":{"description":"Identifier of the alias to retrieve.","allOf":[{"$ref":"#/components/schemas/AliasId"}]},"target":{"type":"string","const":"Alias"}},"required":["target","alias_id"]},{"description":"Retrieval of an API key; `None` resolves to the caller's own key.","type":"object","properties":{"api_key_id":{"description":"Identifier of the API key to retrieve, or `None` to retrieve the caller's own key.","anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}]},"target":{"type":"string","const":"ApiKey"}},"required":["target"]},{"description":"Retrieval of a recorded inference request by its identifier.","type":"object","properties":{"request_id":{"description":"Identifier of the request to retrieve.","allOf":[{"$ref":"#/components/schemas/RequestId"}]},"target":{"type":"string","const":"Request"}},"required":["target","request_id"]},{"description":"Retrieval of a notification email registration by its identifier.","type":"object","properties":{"id":{"description":"Identifier of the notification email to retrieve.","allOf":[{"$ref":"#/components/schemas/TenantNotificationEmailId"}]},"target":{"type":"string","const":"NotificationEmail"}},"required":["target","id"]},{"description":"Retrieval of a webhook registration by its identifier.","type":"object","properties":{"id":{"description":"Identifier of the webhook to retrieve.","allOf":[{"$ref":"#/components/schemas/TenantWebhookId"}]},"target":{"type":"string","const":"Webhook"}},"required":["target","id"]}]},"Update":{"description":"Specific resource type and identifier for an update (mutation) action.\n\nEach variant records which entity was modified. Access-token variants\nare separated from their parent resource because rotating a secret is\na distinct auditable event.","oneOf":[{"description":"Mutation of a tenant's mutable fields (e.g., display name).","type":"object","properties":{"tenant_id":{"description":"Identifier of the tenant being updated.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Tenant"}},"required":["target","tenant_id"]},{"description":"Mutation of a provider's configuration (e.g., endpoint URL, display name).","type":"object","properties":{"provider_id":{"description":"Identifier of the provider being updated.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"target":{"type":"string","const":"Provider"}},"required":["target","provider_id"]},{"description":"Rotation or replacement of a provider's upstream access token.","type":"object","properties":{"provider_id":{"description":"Identifier of the provider whose access token is being rotated.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"target":{"type":"string","const":"ProviderAccessToken"}},"required":["target","provider_id"]},{"description":"Mutation of a model's metadata or configuration.","type":"object","properties":{"model_id":{"description":"Identifier of the model being updated.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"Model"}},"required":["target","model_id"]},{"description":"Mutation of an alias's target or display name.","type":"object","properties":{"alias_id":{"description":"Identifier of the alias being updated.","allOf":[{"$ref":"#/components/schemas/AliasId"}]},"target":{"type":"string","const":"Alias"}},"required":["target","alias_id"]},{"description":"Mutation of an API key's metadata (e.g., label, accessible models).","type":"object","properties":{"api_key_id":{"description":"Identifier of the API key being updated.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"target":{"type":"string","const":"ApiKey"}},"required":["target","api_key_id"]},{"description":"Mutation of a license's terms or status.","type":"object","properties":{"license_id":{"description":"Identifier of the license being updated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"License"}},"required":["target","license_id"]},{"description":"Rotation or replacement of an API key's bearer token.","type":"object","properties":{"api_key_id":{"description":"Identifier of the API key whose access token is being rotated.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"target":{"type":"string","const":"ApiKeyAccessToken"}},"required":["target","api_key_id"]},{"description":"Cancellation (or cancellation withdrawal) of a subscription.","type":"object","properties":{"subscription_id":{"description":"Identifier of the subscription whose cancellation is being updated.","allOf":[{"$ref":"#/components/schemas/SubscriptionId"}]},"target":{"type":"string","const":"SubscriptionCancellation"}},"required":["target","subscription_id"]},{"description":"Cancellation (or cancellation withdrawal) of several subscriptions at once.","type":"object","properties":{"subscription_ids":{"description":"Identifiers of the subscriptions whose cancellation is being updated.","type":"array","items":{"$ref":"#/components/schemas/SubscriptionId"}},"target":{"type":"string","const":"SubscriptionsCancellation"}},"required":["target","subscription_ids"]},{"description":"Mutation of a notification email's address or flags.","type":"object","properties":{"id":{"description":"Identifier of the notification email being updated.","allOf":[{"$ref":"#/components/schemas/TenantNotificationEmailId"}]},"target":{"type":"string","const":"NotificationEmail"}},"required":["target","id"]},{"description":"Mutation of a webhook's URL or flags.","type":"object","properties":{"id":{"description":"Identifier of the webhook being updated.","allOf":[{"$ref":"#/components/schemas/TenantWebhookId"}]},"target":{"type":"string","const":"Webhook"}},"required":["target","id"]},{"description":"Mutation of a license deprecation's deadline or description.","type":"object","properties":{"license_id":{"description":"License whose deprecation is being updated.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"LicenseDeprecation"}},"required":["target","license_id"]},{"description":"Grantee acceptance of a license deprecation, triggering immediate transfer.","type":"object","properties":{"license_id":{"description":"License whose deprecation is being accepted.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Tenant accepting the deprecation.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"LicenseDeprecationAccepted"}},"required":["target","license_id","tenant_id"]},{"description":"Mutation of a model deprecation's deadline or description.","type":"object","properties":{"model_id":{"description":"Model whose deprecation is being updated.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"ModelDeprecation"}},"required":["target","model_id"]},{"description":"Grantee acceptance of a model deprecation, retargeting their aliases immediately.","type":"object","properties":{"model_id":{"description":"Model whose deprecation is being accepted.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"tenant_id":{"description":"Tenant accepting the deprecation (whose aliases are retargeted).","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"ModelDeprecationAccepted"}},"required":["target","model_id","tenant_id"]}]},"Delete":{"description":"Specific resource type and identifier for a delete action.\n\nEach variant records which entity was removed and the identifiers\nneeded to locate it in the resource hierarchy.","oneOf":[{"description":"Soft-deletion of a tenant and all its owned resources.","type":"object","properties":{"tenant_id":{"description":"Identifier of the tenant being deleted.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"Tenant"}},"required":["target","tenant_id"]},{"description":"Removal of a provider from its parent tenant.","type":"object","properties":{"provider_id":{"description":"Identifier of the provider being deleted.","allOf":[{"$ref":"#/components/schemas/ProviderId"}]},"target":{"type":"string","const":"Provider"}},"required":["target","provider_id"]},{"description":"Removal of a model definition from its parent provider.","type":"object","properties":{"model_id":{"description":"Identifier of the model being deleted.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"Model"}},"required":["target","model_id"]},{"description":"Removal of a deployment, identified by model or deployment ID.","type":"object","properties":{"target":{"type":"string","const":"Deployment"}},"oneOf":[{"description":"Holds a [`ModelId`]; indicates the referenced entity is a Model.","type":"object","properties":{"target_id_type":{"type":"string","const":"Model"},"target_id":{"$ref":"#/components/schemas/ModelId"}},"required":["target_id_type","target_id"]},{"description":"Holds a [`DeploymentId`]; indicates the referenced entity is a Deployment.","type":"object","properties":{"target_id_type":{"type":"string","const":"Deployment"},"target_id":{"$ref":"#/components/schemas/DeploymentId"}},"required":["target_id_type","target_id"]}],"required":["target"]},{"description":"Revocation of a license grant, removing a tenant's access to the license.","type":"object","properties":{"license_id":{"description":"License whose grant is being revoked.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"tenant_id":{"description":"Tenant losing access through this grant revocation.","allOf":[{"$ref":"#/components/schemas/TenantId"}]},"target":{"type":"string","const":"LicenseGrant"}},"required":["target","license_id","tenant_id"]},{"description":"Removal of a subscription.","type":"object","properties":{"subscription_id":{"description":"Identifier of the subscription being deleted.","allOf":[{"$ref":"#/components/schemas/SubscriptionId"}]},"target":{"type":"string","const":"Subscription"}},"required":["target","subscription_id"]},{"description":"Removal of several subscriptions at once.","type":"object","properties":{"subscription_ids":{"description":"Identifiers of the subscriptions being deleted.","type":"array","items":{"$ref":"#/components/schemas/SubscriptionId"}},"target":{"type":"string","const":"Subscriptions"}},"required":["target","subscription_ids"]},{"description":"Removal of a license and all its associated grants.","type":"object","properties":{"license_id":{"description":"Identifier of the license being deleted.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"License"}},"required":["target","license_id"]},{"description":"Cancellation (soft-deletion) of a license deprecation.","type":"object","properties":{"license_id":{"description":"License whose deprecation is being cancelled.","allOf":[{"$ref":"#/components/schemas/LicenseId"}]},"target":{"type":"string","const":"LicenseDeprecation"}},"required":["target","license_id"]},{"description":"Cancellation (soft-deletion) of a model deprecation.","type":"object","properties":{"model_id":{"description":"Model whose deprecation is being cancelled.","allOf":[{"$ref":"#/components/schemas/ModelId"}]},"target":{"type":"string","const":"ModelDeprecation"}},"required":["target","model_id"]},{"description":"Removal of a model alias.","type":"object","properties":{"alias_id":{"description":"Identifier of the alias being deleted.","allOf":[{"$ref":"#/components/schemas/AliasId"}]},"target":{"type":"string","const":"Alias"}},"required":["target","alias_id"]},{"description":"Removal of an API key, invalidating its bearer token.","type":"object","properties":{"api_key_id":{"description":"Identifier of the API key being deleted.","allOf":[{"$ref":"#/components/schemas/ApiKeyId"}]},"target":{"type":"string","const":"ApiKey"}},"required":["target","api_key_id"]},{"description":"Removal of a notification email registration.","type":"object","properties":{"id":{"description":"Identifier of the notification email being deleted.","allOf":[{"$ref":"#/components/schemas/TenantNotificationEmailId"}]},"target":{"type":"string","const":"NotificationEmail"}},"required":["target","id"]},{"description":"Removal of a webhook registration.","type":"object","properties":{"id":{"description":"Identifier of the webhook being deleted.","allOf":[{"$ref":"#/components/schemas/TenantWebhookId"}]},"target":{"type":"string","const":"Webhook"}},"required":["target","id"]}]},"Proxy":{"description":"Proxy request to an external service for model discovery or repository browsing.","oneOf":[{"description":"Search for models on HuggingFace Hub.","type":"object","properties":{"target":{"type":"string","const":"HuggingFaceModels"}},"required":["target"]},{"description":"List available licenses from HuggingFace Hub.","type":"object","properties":{"target":{"type":"string","const":"HuggingFaceLicenses"}},"required":["target"]},{"description":"List GGUF files in a HuggingFace repository.","type":"object","properties":{"target":{"type":"string","const":"HuggingFaceGgufRepoFiles"}},"required":["target"]},{"description":"List all files in a HuggingFace repository.","type":"object","properties":{"target":{"type":"string","const":"HuggingFaceRepoFiles"}},"required":["target"]}]},"Auth":{"description":"Authentication flow actions (OIDC-based).","oneOf":[{"description":"OIDC authorization code exchange.","type":"object","properties":{"target":{"type":"string","const":"OidcAuthorizationCode"}},"required":["target"]},{"description":"Token exchange flow.","type":"object","properties":{"target":{"type":"string","const":"TokenExchange"}},"required":["target"]},{"description":"Token refresh flow.","type":"object","properties":{"target":{"type":"string","const":"TokenRefresh"}},"required":["target"]}]},"InferenceRequest":{"description":"Inference request routing and logging.","oneOf":[{"description":"A routed inference request with its tracking metadata.","type":"object","properties":{"request_id":{"description":"Unique identifier for the inference request.","allOf":[{"$ref":"#/components/schemas/RequestId"}]},"model_identifier":{"description":"The model identifier used for routing.","type":"string"},"target":{"type":"string","const":"Request"}},"required":["target","request_id","model_identifier"]}]},"AuditLogIdPath":{"type":"object","properties":{"audit_log_id":{"$ref":"#/components/schemas/AuditLogId"}},"required":["audit_log_id"]},"OidcEnabledResponse":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"UserInfo":{"description":"User role for role-based access control.\n\nRoles are hierarchical:\n- System admins (Full/Read) have access to all tenants\n- Tenant admins (Full/Read) have access to specific tenant\n- Tenant users have read-only access to specific tenant","type":"object","properties":{"display_name":{"type":"string"},"tenant_id":{"anyOf":[{"$ref":"#/components/schemas/TenantId"},{"type":"null"}]},"api_key_id":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyId"},{"type":"null"}]}},"required":["display_name"],"oneOf":[{"description":"Full read/write access to all tenants and system-wide configuration; required for tenant provisioning and global settings.","type":"object","properties":{"role":{"type":"string","const":"SystemAdminFull"}},"required":["role"]},{"description":"Read-only access to all tenants and system-wide resources; useful for auditing and monitoring without mutation privileges.","type":"object","properties":{"role":{"type":"string","const":"SystemAdminRead"}},"required":["role"]},{"description":"Full read/write access scoped to a single tenant; grants management of that tenant's providers, models, keys, and licenses.","type":"object","properties":{"role":{"type":"string","const":"TenantAdminFull"},"role_tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["role","role_tenant_id"]},{"description":"Read-only access scoped to a single tenant; allows viewing tenant resources without the ability to create, update, or delete them.","type":"object","properties":{"role":{"type":"string","const":"TenantAdminRead"},"role_tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["role","role_tenant_id"]},{"description":"Basic read-only access scoped to a single tenant; intended for end-users who consume models but do not manage tenant configuration.","type":"object","properties":{"role":{"type":"string","const":"TenantUser"},"role_tenant_id":{"$ref":"#/components/schemas/TenantId"}},"required":["role","role_tenant_id"]}]},"TokenExchangeRequest":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":["string","null"]},"refresh_expires_in":{"type":["integer","null"],"format":"int64"}},"required":["access_token"]},"HuggingFaceModelSearchQuery":{"type":"object","properties":{"filter":{"description":"Filters can be set multiple times and as comma separated values or any combination thereof","type":["array","null"],"items":{"type":"string"},"default":[]},"skip":{"type":["integer","null"],"format":"uint32","minimum":0},"limit":{"type":["integer","null"],"format":"uint32","minimum":0},"search":{"type":["string","null"]}}},"HuggingFaceApiKeyQuery":{"type":"object","properties":{"huggingface_api_key":{"type":["string","null"]}}},"HuggingFaceModel":{"description":"A model entry from the HuggingFace Hub API.","type":"object","properties":{"id":{"type":"string"},"pipeline_tag":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"downloads":{"type":["integer","null"],"format":"uint","minimum":0},"likes":{"type":["integer","null"],"format":"uint","minimum":0}},"required":["id"]},"HuggingFaceRepoIdPath":{"type":"object","properties":{"repo_id":{"type":"string"}},"required":["repo_id"]},"OpenAiModelList":{"description":"Paginated list response from the `GET /models` endpoint.","type":"object","properties":{"object":{"description":"Resource type identifier; always `\"list\"` for model listing responses.","type":"string"},"data":{"description":"Ordered collection of [`OpenAiModel`] entries available on the provider.","type":"array","items":{"$ref":"#/components/schemas/OpenAiModel"}}},"required":["object","data"]},"OpenAiModel":{"description":"OpenAI model metadata.","type":"object","properties":{"id":{"description":"Provider-assigned model identifier, e.g. `\"gpt-4o\"` or `\"llama-3-8b\"`.","type":"string"},"object":{"description":"Resource type identifier; `\"model\"` for a model entry.","type":"string","default":"model"},"created":{"description":"Unix timestamp (seconds) when the model was created or registered.","type":"integer","format":"int64","default":0},"owned_by":{"description":"Organization or entity that published the model, e.g. `\"openai\"` or `\"meta\"`.","type":"string"},"context_length":{"description":"Total context window in tokens (input + output), when known.\n\nDeserialized from the engine's `max_model_len` (vLLM) and served to\nclients as `context_length`.","type":["integer","null"],"format":"uint32","minimum":0},"top_provider":{"description":"Provider-level limits for the model.","anyOf":[{"$ref":"#/components/schemas/OpenAiModelTopProvider"},{"type":"null"}]},"architecture":{"description":"Modalities and capability description of the model.","anyOf":[{"$ref":"#/components/schemas/OpenAiModelArchitecture"},{"type":"null"}]},"supported_parameters":{"description":"Request parameters the model supports (e.g. `tools`, `reasoning`).","type":"array","items":{"type":"string"}}},"required":["id","owned_by"],"additionalProperties":true},"OpenAiModelTopProvider":{"description":"Provider-level limits for a model, mirroring OpenRouter's `top_provider`.","type":"object","properties":{"max_completion_tokens":{"description":"Maximum output tokens allowed for a single completion, when known.","type":["integer","null"],"format":"uint32","minimum":0}}},"OpenAiModelArchitecture":{"description":"Modality/capability description of a model, mirroring OpenRouter's `architecture`.","type":"object","properties":{"modality":{"description":"Compact `\"input->output\"` summary, e.g. `\"text+image->text\"`, when both sides are known.","type":["string","null"]},"input_modalities":{"description":"Input modalities the model accepts (e.g. `text`, `image`, `audio`).","type":"array","items":{"type":"string"}},"output_modalities":{"description":"Output modalities the model produces.","type":"array","items":{"type":"string"}}},"required":["input_modalities","output_modalities"]},"OpenAiChatCompletionRequest":{"description":"Chat completion request body sent to `POST /chat/completions`.","type":"object","properties":{"model":{"description":"Identifier of the model to run inference against, e.g. `\"gpt-4o-mini\"`.","type":"string"},"stream":{"description":"When `true`, the provider returns server-sent events instead of a single JSON response; `None` defaults to non-streaming.","type":["boolean","null"]},"logprobs":{"description":"When `true`, the response includes per-token log-probabilities in each choice; `None` omits logprobs.","type":["boolean","null"]},"stream_options":{"description":"Additional streaming configuration such as whether to include a final usage summary event; `None` uses provider defaults.","anyOf":[{"$ref":"#/components/schemas/OpenAiStreamOptions"},{"type":"null"}]},"max_tokens":{"description":"Maximum number of output tokens to generate; `None` lets the engine use\nthe room remaining in its context window after the prompt.","type":["integer","null"],"format":"uint32","minimum":0}},"required":["model"],"additionalProperties":true},"OpenAiStreamOptions":{"description":"Streaming configuration options passed alongside `stream: true` requests.","type":"object","properties":{"include_usage":{"description":"When `true`, the provider appends a final SSE event containing aggregated [`OpenAiChatCompletionResponseUsage`]; `None` disables the usage event.","type":["boolean","null"]}},"additionalProperties":true},"OpenAiChatCompletionResponse":{"description":"Complete non-streaming response from `POST /chat/completions`.","type":"object","properties":{"id":{"description":"Unique provider-assigned identifier for this completion, e.g. `\"chatcmpl-abc123\"`.","type":"string"},"model":{"description":"Model that generated the completion; may differ from the requested model if an alias was used.","type":"string"},"choices":{"description":"One or more generated completion alternatives, ordered by index.","type":"array","items":{"$ref":"#/components/schemas/OpenAiChatCompletionChoice"}},"usage":{"description":"Aggregated token usage for prompt and completion across all choices.","allOf":[{"$ref":"#/components/schemas/OpenAiChatCompletionResponseUsage"}]}},"required":["id","model","choices","usage"],"additionalProperties":true},"OpenAiChatCompletionChoice":{"description":"Single completion alternative within a chat completion response.","type":"object","properties":{"index":{"description":"Zero-based index of this choice within the `choices` array, corresponding to the `n` parameter.","type":"integer","format":"uint32","minimum":0},"message":{"description":"Assistant message produced by the model for this choice.","allOf":[{"$ref":"#/components/schemas/OpenAiChatCompletionMessage"}]},"finish_reason":{"description":"Reason the model stopped generating; `None` while the response is still being produced. Common values: `\"stop\"`, `\"length\"`, `\"tool_calls\"`.","type":["string","null"]}},"required":["index","message"],"additionalProperties":true},"OpenAiChatCompletionMessage":{"description":"Single message in a chat completion response, including optional tool call invocations.","type":"object","properties":{"role":{"description":"Message author role, typically `\"assistant\"` for model-generated messages.","type":"string"},"content":{"description":"Text content of the message; `None` when the model emits only tool calls with no accompanying text.","type":["string","null"]},"reasoning_content":{"description":"Incremental chain-of-thought reasoning content emitted by reasoning models (e.g. o1) by some provider (e.g. LlamaCPP); `None` for non-reasoning models.","type":["string","null"]},"reasoning":{"description":"Incremental chain-of-thought reasoning content emitted by reasoning models (e.g. o1) by some providers (e.g. vLLM); `None` for non-reasoning models.","type":["string","null"]},"tool_calls":{"description":"Tool call invocations requested by the model; `None` when no tools are called, empty `Vec` is never returned.","type":["array","null"],"items":true,"default":null}},"required":["role"],"additionalProperties":true},"OpenAiChatCompletionResponseUsage":{"description":"Token usage statistics returned in a non-streaming chat completion response.","type":"object","properties":{"prompt_tokens":{"description":"Number of tokens consumed by the input messages and system prompt.","type":"integer","format":"uint32","minimum":0},"completion_tokens":{"description":"Number of tokens generated by the model in the completion.","type":"integer","format":"uint32","minimum":0},"prompt_tokens_details":{"description":"Breakdown of `prompt_tokens`; `None` when the provider sent none.","anyOf":[{"$ref":"#/components/schemas/OpenAiPromptTokensDetails"},{"type":"null"}]}},"required":["prompt_tokens","completion_tokens"],"additionalProperties":true},"OpenAiPromptTokensDetails":{"description":"Breakdown of a response's prompt tokens.\n\nvLLM only sends this when started with `--enable-prompt-tokens-details`, and leaves it out\nentirely when nothing was cached.","type":"object","properties":{"cached_tokens":{"description":"How many of the prompt tokens the provider served from its prefix cache.","type":["integer","null"],"format":"uint32","minimum":0}},"additionalProperties":true},"OpenAiCompletionRequest":{"description":"Legacy completion request body sent to `POST /completions`.","type":"object","properties":{"model":{"description":"Identifier of the model to run inference against.","type":"string"},"stream":{"description":"When `true`, the provider returns server-sent events instead of a single JSON response; `None` defaults to non-streaming.","type":["boolean","null"]},"stream_options":{"description":"Additional streaming configuration; `None` uses provider defaults.","anyOf":[{"$ref":"#/components/schemas/OpenAiStreamOptions"},{"type":"null"}]}},"required":["model"],"additionalProperties":true},"OpenAiCompletionResponse":{"description":"Complete non-streaming response from `POST /completions`.","type":"object","properties":{"id":{"description":"Unique provider-assigned identifier for this completion.","type":"string"},"model":{"description":"Model that generated the completion.","type":"string"},"usage":{"description":"Aggregated token usage for prompt and completion.","allOf":[{"$ref":"#/components/schemas/OpenAiCompletionResponseUsage"}]}},"required":["id","model","usage"],"additionalProperties":true},"OpenAiCompletionResponseUsage":{"description":"Token usage statistics returned in a non-streaming legacy completion response.","type":"object","properties":{"prompt_tokens":{"description":"Number of tokens consumed by the input prompt.","type":"integer","format":"uint32","minimum":0},"completion_tokens":{"description":"Number of tokens generated by the model in the completion.","type":"integer","format":"uint32","minimum":0},"prompt_tokens_details":{"description":"Breakdown of `prompt_tokens`; `None` when the provider sent none.","anyOf":[{"$ref":"#/components/schemas/OpenAiPromptTokensDetails"},{"type":"null"}]}},"required":["prompt_tokens","completion_tokens"],"additionalProperties":true},"OpenAiEmbeddingRequest":{"description":"Embedding request body sent to `POST /embeddings`.","type":"object","properties":{"model":{"description":"Identifier of the embedding model to use, e.g. `\"text-embedding-3-small\"`.","type":"string"}},"required":["model"],"additionalProperties":true},"OpenAiEmbeddingResponse":{"description":"Complete response from `POST /embeddings`.","type":"object","properties":{"model":{"description":"Model that produced the embeddings.","type":"string"},"usage":{"description":"Aggregated token usage for the embedding request.","allOf":[{"$ref":"#/components/schemas/OpenAiEmbeddingResponseUsage"}]}},"required":["model","usage"],"additionalProperties":true},"OpenAiEmbeddingResponseUsage":{"description":"Token usage statistics returned in an embedding response.","type":"object","properties":{"prompt_tokens":{"description":"Number of tokens consumed by the input text.","type":"integer","format":"uint32","minimum":0}},"required":["prompt_tokens"],"additionalProperties":true},"MessagesRequestBody":{"anyOf":[{"$ref":"#/components/schemas/NonStreamingMessagesRequestBody"},{"$ref":"#/components/schemas/StreamingMessagesRequestBody"}]},"NonStreamingMessagesRequestBody":{"type":"object","properties":{"stream":{"anyOf":[{"$ref":"#/components/schemas/False"},{"type":"null"}]},"model":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageParam"}},"system":{"anyOf":[{"$ref":"#/components/schemas/MessageContent"},{"type":"null"}]}},"required":["messages"],"additionalProperties":true},"False":{"const":false},"MessageParam":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/MessageContent"}},"required":["content"],"additionalProperties":true},"MessageContent":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ContentBlock"}}]},"ContentBlock":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","const":"text"}},"required":["type","text"],"additionalProperties":true},{"type":"object","properties":{"thinking":{"type":"string"},"signature":{"type":"string","default":""},"type":{"type":"string","const":"thinking"}},"required":["type","thinking"],"additionalProperties":true},{"type":"object","properties":{"name":{"type":"string"},"input":true,"type":{"type":"string","const":"tool_use"}},"required":["type","name","input"],"additionalProperties":true},true]},"StreamingMessagesRequestBody":{"type":"object","properties":{"stream":{"$ref":"#/components/schemas/True"},"model":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageParam"}},"system":{"anyOf":[{"$ref":"#/components/schemas/MessageContent"},{"type":"null"}]}},"required":["stream","messages"],"additionalProperties":true},"True":{"const":true},"MessagesResponseBody":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ContentBlock"},"default":[]},"stop_reason":{"type":["string","null"],"default":null},"stop_sequence":{"type":["string","null"],"default":null},"usage":{"default":{},"allOf":[{"$ref":"#/components/schemas/MessagesUsage"}]}},"additionalProperties":true},"MessagesUsage":{"type":"object","properties":{"input_tokens":{"type":["integer","null"],"format":"uint32","minimum":0},"output_tokens":{"type":["integer","null"],"format":"uint32","minimum":0}},"additionalProperties":true},"ResponsesRequestBody":{"anyOf":[{"$ref":"#/components/schemas/NonStreamingResponsesRequestBody"},{"$ref":"#/components/schemas/StreamingResponsesRequestBody"}]},"NonStreamingResponsesRequestBody":{"type":"object","properties":{"stream":{"anyOf":[{"$ref":"#/components/schemas/False"},{"type":"null"}]},"model":{"type":["string","null"]},"input":{"$ref":"#/components/schemas/ResponsesInput"},"instructions":{"type":["string","null"]}},"required":["input"],"additionalProperties":true},"ResponsesInput":{"anyOf":[{"type":"string"},{"type":"array","items":true}]},"StreamingResponsesRequestBody":{"type":"object","properties":{"stream":{"$ref":"#/components/schemas/True"},"model":{"type":["string","null"]},"input":{"$ref":"#/components/schemas/ResponsesInput"},"instructions":{"type":["string","null"]}},"required":["stream","input"],"additionalProperties":true},"ResponseBody":{"type":"object","properties":{"output":{"type":"array","items":{"$ref":"#/components/schemas/OutputItem"},"default":[]},"usage":{"anyOf":[{"$ref":"#/components/schemas/ResponsesUsage"},{"type":"null"}]},"error":true},"additionalProperties":true},"OutputItem":{"anyOf":[{"type":"object","properties":{"id":{"type":["string","null"]},"role":{"type":["string","null"]},"status":{"type":["string","null"]},"content":{"type":"array","items":{"$ref":"#/components/schemas/ContentPart"},"default":[]},"type":{"type":"string","const":"message"}},"additionalProperties":true,"required":["type"]},{"type":"object","properties":{"id":{"type":["string","null"]},"summary":{"type":"array","items":{"$ref":"#/components/schemas/ReasoningPart"},"default":[]},"content":{"type":["array","null"],"items":{"$ref":"#/components/schemas/ReasoningPart"}},"type":{"type":"string","const":"reasoning"}},"additionalProperties":true,"required":["type"]},{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":"string"},"arguments":{"type":"string","default":""},"type":{"type":"string","const":"function_call"}},"required":["type","name"],"additionalProperties":true},true]},"ContentPart":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","const":"output_text"}},"required":["type","text"],"additionalProperties":true},{"type":"object","properties":{"refusal":{"type":"string"},"type":{"type":"string","const":"refusal"}},"required":["type","refusal"],"additionalProperties":true},{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","const":"reasoning_text"}},"required":["type","text"],"additionalProperties":true},true]},"ReasoningPart":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","const":"summary_text"}},"required":["type","text"],"additionalProperties":true},{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","const":"reasoning_text"}},"required":["type","text"],"additionalProperties":true},true]},"ResponsesUsage":{"type":"object","properties":{"input_tokens":{"type":["integer","null"],"format":"uint32","minimum":0},"output_tokens":{"type":["integer","null"],"format":"uint32","minimum":0},"total_tokens":{"type":["integer","null"],"format":"uint32","minimum":0}},"additionalProperties":true},"OpenAiAudioTranscriptionResponse":{"description":"Complete non-streaming response from `POST /audio/transcriptions`.","type":"object","properties":{"usage":{"description":"Token or duration usage statistics; `None` when the provider does not report usage for transcription.","anyOf":[{"$ref":"#/components/schemas/OpenAiAudioTranscriptionResponseUsage"},{"type":"null"}]}},"additionalProperties":true},"OpenAiAudioTranscriptionResponseUsage":{"description":"Usage statistics for an audio transcription, discriminated by billing model.","oneOf":[{"description":"Token-based billing where the provider charges per input/output token pair, used by newer transcription models.","type":"object","properties":{"input_tokens":{"description":"Number of tokens consumed from the audio input.","type":"integer","format":"uint32","minimum":0},"output_tokens":{"description":"Number of tokens generated in the transcription output.","type":"integer","format":"uint32","minimum":0},"type":{"type":"string","const":"tokens"}},"required":["type","input_tokens","output_tokens"],"additionalProperties":true},{"description":"Duration-based billing where the provider charges per second of audio processed, used by models like `whisper-1`.","type":"object","properties":{"seconds":{"description":"Length of the audio that was processed, in whole seconds.","type":"integer","format":"uint32","minimum":0},"type":{"type":"string","const":"duration"}},"required":["type","seconds"],"additionalProperties":true}]}}},"tags":[{"name":"Documentation routes","description":"API documentation and specification endpoints. Access OpenAPI spec, Swagger UI, Scalar, and ReDoc interfaces."},{"name":"HuggingFace proxy routes","description":"HuggingFace proxy endpoints. Browse models, licenses, and GGUF files from HuggingFace repositories. No affiliation with HuggingFace is implied."},{"name":"OpenAI-compatible inference routes","description":"OpenAI-compatible inference endpoints. For in-depth information please refer to the official reference. No affiliation with OpenAI is implied.","externalDocs":{"description":"The official OpenAI API reference","url":"https://developers.openai.com/api/reference/overview"}},{"name":"Anthropic-compatible inference routes","description":"Anthropic-compatible inference endpoints. For in-depth information please refer to the official reference. No affiliation with Anthropic is implied.","externalDocs":{"description":"The official Anthropic Messages API reference","url":"https://docs.anthropic.com/en/api/messages"}},{"name":"Auth routes","description":"Handles auth token exchange and user info requests for the frontend."},{"name":"AuditLog routes","description":"Audit logs and audit trail. Query logs for debugging and compliance tracking."},{"name":"Tenant routes","description":"Tenant management. Create and manage organizations/tenants within the inference service."},{"name":"Provider routes","description":"AI provider management. Configure and manage inference providers (GPUStack, OpenAI-compatible endpoints, etc.)."},{"name":"Model routes","description":"AI model management. Register models, track deployment status, and manage model metadata."},{"name":"Deployment routes","description":"Model deployment orchestration. Deploy models to providers, monitor deployment events, and track resource usage."},{"name":"Alias routes","description":"Model aliases. Create user-friendly names for AI models (e.g., 'gpt-4' -> actual model ID)."},{"name":"License routes","description":"License management. Manage licenses and grant tenant access to licensed resources."},{"name":"LicenseGrant routes","description":"License grant management. Control cross-tenant license sharing and acceptance."},{"name":"Subscription routes","description":"Subscription management. Subscribe a tenant to a granted license, and manage cancellation."},{"name":"LicenseDeprecation routes","description":"License deprecation management. Plan and manage deprecation of licenses, optionally migrating grantees to replacements."},{"name":"ModelDeprecation routes","description":"Model deprecation management. Plan and manage phase-out of models, optionally retargeting aliases to a replacement model."},{"name":"ApiKey routes","description":"API key management. Create and manage API keys for authentication and access control."},{"name":"Request routes","description":"Inference requests. Query recorded inference requests with prompt, response, and usage metadata."},{"name":"TenantNotificationEmail routes","description":"Notification email management. Register email addresses to receive tenant event notifications."},{"name":"TenantWebhook routes","description":"Webhook management. Register webhook endpoints to receive tenant event notifications."},{"name":"TenantNotificationStream routes","description":"SSE notification stream. Subscribe to a real-time stream of tenant events for the UI notification box."},{"name":"DeploymentLog routes","description":"Deployment logs. View inference engine output from running deployments."},{"name":"Auth routes","description":"Handles auth token exchange and user info requests for the frontend."}]}