Pydantic models generated from the OpenAPI document; import them from carmen_cloud_client.carmen_cloud.models.
Apis
| Field | Type | Required | Description |
|---|
apiVersion | str | None | | Pinned API version, if any. |
engineParameterOverrides | dict[str, Any] | None | | Engine parameter overrides, if any. |
Products
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Whether the key may call the product. |
limits | dict[str, float] | None | | Per-subscription-type call limits (e.g. carmen_freeflow, carmen_go). |
apis | dict[str, Apis] | None | | Per-API settings of the product (e.g. vehicle, transport, pr22). |
ApiKey
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The owning workspace. |
apiKeyId | str | yes | The API key id. |
name | str | yes | Display name. |
value | str | yes | The secret API key value (send as x-api-key). |
role | str | None | | Workspace-management role of the key, when it may call the workspace API itself. Known values: ADMIN, EDITOR, ACCOUNTANT; others may appear. |
products | dict[str, Products] | None | | Product access per product id (carmen, freeflow, pr). |
ApiKeyPage
| Field | Type | Required | Description |
|---|
list_ | list[ApiKey] | yes | The API keys of this page. |
lastKey | str | None | yes | Opaque pagination cursor for the next page (last_key query parameter); null on the last page. |
Day
| Field | Type | Required | Description |
|---|
day | str | None | | The UTC day, YYYY-MM-DD. |
quantity | int | None | | Total billable calls that day. |
byProduct | dict[str, float] | None | | Quantity per product id (e.g. carmen, freeflow, pr). |
byApi | dict[str, float] | None | | Quantity per API name (e.g. vehicle, transport). |
Cap
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Whether the usage hard cap ("Stop at plan limit") is on for the product. |
useCredits | bool | yes | Whether prepaid credits are used after the limit. |
included | float | yes | Lookups included in the current billing period. |
used | float | yes | Billable lookups used so far in the period (real time, all API keys). |
remaining | float | yes | max(0, included - used). |
creditsRemaining | float | yes | Prepaid credit balance of the product. |
periodId | str | yes | The current billing period (<start>_<end>). |
periodEnd | str | yes | When the period renews, YYYY-MM-DD (UTC). |
reached | bool | yes | enabled and used >= included: requests are rejected (or, with useCredits, paid from prepaid credits) until the period renews. |
ApiKeyUsageReport
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The workspace the usage belongs to. |
apiKeyId | str | None | | The API key the report is scoped to. |
from_ | str | yes | First reported day (inclusive), YYYY-MM-DD (UTC). |
to | str | yes | Last reported day (inclusive), YYYY-MM-DD (UTC). |
totalQuantity | int | yes | Sum of all daily quantities in the range. |
days | list[Day] | yes | One entry per day with recorded usage, ascending. |
cap | dict[str, Cap] | None | | Real-time billing-period status per subscribed metered product id (carmen, pr): lookups used and remaining in the current period and the usage hard cap state. Workspace-level (all API keys) and current to the second, unlike days. Empty for workspaces without a metered subscription. |
BillingAuthSession
| Field | Type | Required | Description |
|---|
token | str | yes | The Stripe customer-session client secret for the embedded component. |
BillingPortalSession
| Field | Type | Required | Description |
|---|
url | str | yes | The Stripe billing-portal session URL to redirect to. |
StripeRegion
Enumeration: 'eu', 'us'
BillingPONumbers
| Field | Type | Required | Description |
|---|
carmen | str | None | | PO number for Carmen Recognition Service invoices. |
pr | str | None | | PO number for Carmen ID Recognition Service invoices. |
BillingProfile
| Field | Type | Required | Description |
|---|
stripeRegion | StripeRegion | yes | Locked Stripe billing account. |
stripeCustomerId | str | yes | Provisioned Stripe customer id. |
billingPONumbers | BillingPONumbers | None | | |
ProductId
Enumeration: 'carmen', 'pr'
BillingProfileRequest
| Field | Type | Required | Description |
|---|
stripeRegion | StripeRegion | None | | Billing account selected before the first purchase. Once stored, it cannot be changed. |
poNumber | str | None | | Optional purchase order number for productId. Send an empty string to remove it. |
productId | ProductId | None | | Product whose invoices use the PO number. |
Role
Enumeration: 'ADMIN', 'EDITOR', 'ACCOUNTANT'
Products1
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Whether the key may call the product. |
limits | dict[str, float] | None | | Per-subscription-type call limits (e.g. carmen_freeflow, carmen_go). |
apis | dict[str, Apis] | None | | Per-API settings of the product (e.g. vehicle, transport, pr22). |
CreateApiKeyRequest
| Field | Type | Required | Description |
|---|
name | str | yes | Display name. |
role | Role | None | | Workspace-management role of the key; omit for none. |
products | dict[str, Products1] | None | | Product access per product id; omit for none. |
CreateHookRequest
| Field | Type | Required | Description |
|---|
hookUrl | str | yes | The webhook endpoint URL; must start with http:// or https://. |
apis | dict[str, bool] | yes | API name → subscribe flag. At least one API must be true; each subscribed API (except usages) must have storage enabled. |
DeleteResult
RootModel[str]
ErrorResponse
| Field | Type | Required | Description |
|---|
message | str | yes | Human-readable error description. |
Status
Enumeration: 'pending_confirmation', 'confirmed', 'deleted'
Protocol
Enumeration: 'http', 'https'
Hook
| Field | Type | Required | Description |
|---|
status | Status | yes | Subscription state. New hooks start pending_confirmation until the endpoint confirms the SNS subscription. |
protocol | Protocol | yes | Derived from the hook URL. |
hookUrl | str | yes | The webhook endpoint URL (stored lowercased). |
apis | dict[str, bool] | yes | The APIs the hook subscribes to; only subscribed APIs are listed (value always true). |
topicName | str | yes | The workspace SNS topic name. |
topicArn | str | yes | The workspace SNS topic ARN. |
HookApisPatch
RootModel[dict[str, bool]]
HookList
RootModel[list[Hook]]
Status1
Enumeration: 'pending'
InvitationSentResult
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The workspace. |
email | str | yes | The invited email address. |
role | str | yes | The offered role. Known values: ADMIN, EDITOR, ACCOUNTANT; others may appear. |
status | Status1 | yes | Always pending. |
message | str | yes | Human-readable confirmation. |
InviteUserRequest
| Field | Type | Required | Description |
|---|
email | str | yes | The email address to invite. |
role | Role | None | | The offered role. Defaults to EDITOR; OWNER cannot be invited. |
Usage
| Field | Type | Required | Description |
|---|
dimension | str | yes | The subscribed tier/dimension. |
total | float | yes | Usage reported to Stripe so far. |
included | float | yes | Usage included in the subscription. |
overage | float | yes | Billable usage above the included allowance. |
creditPaid | float | yes | Lookups paid from prepaid credits after the hard cap; never billed as overage. |
waived | float | yes | Overage above the allowance the usage hard cap waived. |
capEnabled | bool | yes | Whether the usage hard cap is on for the product. |
Line
| Field | Type | Required | Description |
|---|
description | str | yes | Invoice line description. |
quantity | float | None | | Line quantity. |
subtotal | float | yes | Line subtotal in the currency minor unit. |
discount | float | yes | Line discount in the currency minor unit. |
tax | float | yes | Line tax in the currency minor unit. |
currency | str | yes | Three-letter lowercase ISO currency code. |
periodStart | float | yes | Line period start, epoch seconds. |
periodEnd | float | yes | Line period end, epoch seconds. |
overage | bool | yes | Whether this is the calculated usage line. |
Invoice
| Field | Type | Required | Description |
|---|
currency | str | yes | Three-letter lowercase ISO currency code. |
subtotal | float | yes | Subtotal in the currency minor unit. |
discount | float | yes | Total discounts in the currency minor unit. |
tax | float | yes | Total tax in the currency minor unit. |
total | float | yes | Invoice total in the currency minor unit. |
amountDue | float | yes | Expected amount due in the currency minor unit. |
automaticTaxStatus | str | None | | Stripe automatic-tax calculation status. |
lines | list[Line] | yes | Preview invoice lines. |
InvoicePreview
| Field | Type | Required | Description |
|---|
generatedAt | float | yes | Preview generation time, epoch seconds. |
usageThrough | float | yes | Hourly query boundary, epoch seconds; only usage already present in Stripe is included. |
invoiceAt | float | yes | Expected current billing-period end, epoch seconds. |
productId | ProductId | yes | The metered product. |
subscriptionId | str | yes | Stripe subscription id. |
cancelAtPeriodEnd | bool | yes | Whether the subscription ends after the current billing period. |
usage | Usage | | |
invoice | Invoice | | |
MessageResponse
| Field | Type | Required | Description |
|---|
message | str | yes | Human-readable confirmation. |
StorageStatus
| Field | Type | Required | Description |
|---|
enabledApis | dict[str, bool] | yes | APIs with event storage enabled; only enabled APIs are listed (value always true). |
topicArn | str | None | yes | The workspace SNS topic ARN when at least one webhook exists; null otherwise. |
StorageStatusPatch
RootModel[dict[str, bool]]
Event
| Field | Type | Required | Description |
|---|
event | dict[str, Any] | None | | The stored recognition event payload, as produced by the recognition API. |
attachmentURLs | list[str] | None | | Pre-signed URLs of stored attachments (e.g. images). |
creationTimestamp | float | yes | When the event was stored, epoch milliseconds. |
requestId | str | yes | The originating request id. |
api | str | yes | The API that produced the event. |
customData | str | None | | The caller-supplied custom data of the original request, if any. |
userAgent | str | None | | User agent of the original request. |
ipAddress | str | None | | Caller IP address of the original request. |
StoredEventPage
| Field | Type | Required | Description |
|---|
events | list[Event] | yes | The stored events of this page. |
continuationToken | str | None | yes | Opaque token for the next page; null when there are no more events. Pass it back as the continuation-token query parameter. |
TransferResult
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The transferred workspace. |
previousOwner | str | yes | Cognito user id of the previous owner. |
newOwner | str | yes | Cognito user id of the new owner. |
message | str | yes | Human-readable confirmation. |
Products2
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Whether the key may call the product. |
limits | dict[str, float] | None | | Per-subscription-type call limits (e.g. carmen_freeflow, carmen_go). |
apis | dict[str, Apis] | None | | Per-API settings of the product (e.g. vehicle, transport, pr22). |
UpdateApiKeyRequest
| Field | Type | Required | Description |
|---|
name | str | yes | Display name. |
role | Role | None | | Workspace-management role of the key; omit for none. |
products | dict[str, Products2] | None | | Product access per product id; omit for none. |
UpdateUserRoleRequest
| Field | Type | Required | Description |
|---|
role | Role | yes | The new role; OWNER cannot be assigned (transfer ownership instead). |
UsageCapRequest
| Field | Type | Required | Description |
|---|
productId | ProductId | yes | The metered product. |
enabled | bool | yes | "Stop at plan limit": once the lookups included in the plan are used up in a billing period, requests are rejected until the period renews and no overage is charged. |
useCredits | bool | None | | "Use prepaid credits after the limit": keep serving requests from the workspace's prepaid credits once the limit is reached. Defaults to false; ignored unless enabled. |
Setting
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Always true while stored; disabling removes the setting. |
useCredits | bool | yes | Whether requests continue from the workspace's prepaid credits once the included lookups are used up ("Use prepaid credits after the limit"). Explicit opt-in. |
anchor | float | yes | Usage reference fixed when the cap was switched on (max(included, used so far)); overage accumulated before that point stays billable. |
anchorPeriodId | str | yes | The billing period the anchor was taken in (<start>_<end>). |
enabledAt | float | yes | When the cap was switched on, epoch milliseconds. |
enabledBy | str | None | | Cognito user id of who switched it on. |
Status2
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Whether the usage hard cap ("Stop at plan limit") is on for the product. |
useCredits | bool | yes | Whether prepaid credits are used after the limit. |
included | float | yes | Lookups included in the current billing period. |
used | float | yes | Billable lookups used so far in the period (real time, all API keys). |
remaining | float | yes | max(0, included - used). |
creditsRemaining | float | yes | Prepaid credit balance of the product. |
periodId | str | yes | The current billing period (<start>_<end>). |
periodEnd | str | yes | When the period renews, YYYY-MM-DD (UTC). |
reached | bool | yes | enabled and used >= included: requests are rejected (or, with useCredits, paid from prepaid credits) until the period renews. |
UsageCapResult
| Field | Type | Required | Description |
|---|
productId | ProductId | yes | The metered product. |
setting | Setting | None | | A usage hard cap setting. |
status | Status2 | yes | The real-time billing-period status of one metered product. |
UsageReport
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The workspace the usage belongs to. |
from_ | str | yes | First reported day (inclusive), YYYY-MM-DD (UTC). |
to | str | yes | Last reported day (inclusive), YYYY-MM-DD (UTC). |
totalQuantity | int | yes | Sum of all daily quantities in the range. |
days | list[Day] | yes | One entry per day with recorded usage, ascending. |
cap | dict[str, Cap] | None | | Real-time billing-period status per subscribed metered product id (carmen, pr): lookups used and remaining in the current period and the usage hard cap state. Workspace-level (all API keys) and current to the second, unlike days. Empty for workspaces without a metered subscription. |
Issue
| Field | Type | Required | Description |
|---|
path | str | None | | The offending parameter, e.g. from. |
message | str | None | | What is wrong with it. |
ValidationError
| Field | Type | Required | Description |
|---|
message | str | yes | Human-readable error description. |
issues | list[Issue] | None | | Per-parameter validation problems (present on query validation errors). |
BillingPONumbers1
| Field | Type | Required | Description |
|---|
carmen | str | None | | PO number printed on Carmen Recognition Service invoices. |
pr | str | None | | PO number printed on Carmen ID Recognition Service invoices. |
UsageCaps
| Field | Type | Required | Description |
|---|
enabled | bool | yes | Always true while stored; disabling removes the setting. |
useCredits | bool | yes | Whether requests continue from the workspace's prepaid credits once the included lookups are used up ("Use prepaid credits after the limit"). Explicit opt-in. |
anchor | float | yes | Usage reference fixed when the cap was switched on (max(included, used so far)); overage accumulated before that point stays billable. |
anchorPeriodId | str | yes | The billing period the anchor was taken in (<start>_<end>). |
enabledAt | float | yes | When the cap was switched on, epoch milliseconds. |
enabledBy | str | None | | Cognito user id of who switched it on. |
Subscriptions
| Field | Type | Required | Description |
|---|
id | str | yes | Stripe subscription id. |
currentPeriodStart | float | None | | Current period start, epoch seconds. |
currentPeriodEnd | float | None | | Current period end, epoch seconds. |
cancelAtPeriodEnd | bool | None | | Whether the subscription ends at period end. |
dimension | str | None | | Subscribed dimension id. |
limit | int | None | | Request allowance of the dimension. |
quantity | int | None | | Subscribed quantity. |
subscriptionScheduleId | str | None | | Stripe subscription schedule id, when a downgrade/change is scheduled. |
nextDimension | str | None | | Dimension taking effect next period, if scheduled. |
nextLimit | int | None | | Allowance taking effect next period, if scheduled. |
nextQuantity | int | None | | Quantity taking effect next period, if scheduled. |
Workspace
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The workspace id. |
name | str | yes | Display name. |
owner | str | yes | Cognito user id of the owner. |
ownerEmail | str | None | | Email address of the owner. |
stripeCustomerId | str | None | | Stripe customer id, once ever billed via Stripe. |
billingPONumbers | BillingPONumbers1 | None | | |
marketplaceCustomerId | str | None | | AWS Marketplace customer id, if any. |
stripeRegion | StripeRegion | None | | The Stripe billing account region. |
marketplaceAccount | str | None | | AWS Marketplace account, if any. |
freeCallCounts | dict[str, float] | None | | Remaining free/credit calls per product id. |
usageCaps | dict[str, UsageCaps] | None | | The usage hard cap ("Stop at plan limit") per metered product id (carmen, pr); absent for products without a cap. The real-time status (used, remaining, reached) is on the usage routes. |
subscriptions | dict[str, Subscriptions] | None | | Active subscriptions per subscription type (e.g. carmen, carmen_freeflow, carmen_go, pr). |
stripeCustomer | dict[str, Any] | None | | The raw Stripe customer object, when available. |
hasPendingPayments | bool | None | | Whether the Stripe customer has payment intents awaiting completion. |
WorkspaceNameRequest
| Field | Type | Required | Description |
|---|
name | str | yes | The workspace display name. |
Status3
Enumeration: 'active', 'pending', 'rejected'
WorkspaceUser
| Field | Type | Required | Description |
|---|
workspaceId | str | yes | The workspace. |
userId | str | yes | Cognito user id (a placeholder id while the invitation is pending). |
email | str | None | | Email address. |
role | str | yes | Role in the workspace. Known values: OWNER, ADMIN, EDITOR, ACCOUNTANT; others may appear. |
status | Status3 | yes | Membership state. |
createdAt | float | None | | Invitation time, epoch milliseconds. |
acceptedAt | float | None | | Acceptance time, epoch milliseconds. |
rejectedAt | float | None | | Rejection time, epoch milliseconds. |
invitedBy | str | None | | Cognito user id of the inviter. |
isOwner | bool | yes | Whether this member owns the workspace. |
name | str | None | | Full name (from Cognito, active members only). |
givenName | str | None | | Given name (from Cognito). |
familyName | str | None | | Family name (from Cognito). |
inviterName | str | None | | Full name of the inviter (from Cognito). |
WorkspaceUserList
RootModel[list[WorkspaceUser]]