Carmen Cloud API models

Pydantic models generated from the OpenAPI document; import them from carmen_cloud_client.carmen_cloud.models.

Apis​

FieldTypeRequiredDescription
apiVersionstr | NonePinned API version, if any.
engineParameterOverridesdict[str, Any] | NoneEngine parameter overrides, if any.

Products​

FieldTypeRequiredDescription
enabledboolyesWhether the key may call the product.
limitsdict[str, float] | NonePer-subscription-type call limits (e.g. carmen_freeflow, carmen_go).
apisdict[str, Apis] | NonePer-API settings of the product (e.g. vehicle, transport, pr22).

ApiKey​

FieldTypeRequiredDescription
workspaceIdstryesThe owning workspace.
apiKeyIdstryesThe API key id.
namestryesDisplay name.
valuestryesThe secret API key value (send as x-api-key).
rolestr | NoneWorkspace-management role of the key, when it may call the workspace API itself. Known values: ADMIN, EDITOR, ACCOUNTANT; others may appear.
productsdict[str, Products] | NoneProduct access per product id (carmen, freeflow, pr).

ApiKeyPage​

FieldTypeRequiredDescription
list_list[ApiKey]yesThe API keys of this page.
lastKeystr | NoneyesOpaque pagination cursor for the next page (last_key query parameter); null on the last page.

Day​

FieldTypeRequiredDescription
daystr | NoneThe UTC day, YYYY-MM-DD.
quantityint | NoneTotal billable calls that day.
byProductdict[str, float] | NoneQuantity per product id (e.g. carmen, freeflow, pr).
byApidict[str, float] | NoneQuantity per API name (e.g. vehicle, transport).

Cap​

FieldTypeRequiredDescription
enabledboolyesWhether the usage hard cap ("Stop at plan limit") is on for the product.
useCreditsboolyesWhether prepaid credits are used after the limit.
includedfloatyesLookups included in the current billing period.
usedfloatyesBillable lookups used so far in the period (real time, all API keys).
remainingfloatyesmax(0, included - used).
creditsRemainingfloatyesPrepaid credit balance of the product.
periodIdstryesThe current billing period (<start>_<end>).
periodEndstryesWhen the period renews, YYYY-MM-DD (UTC).
reachedboolyesenabled and used >= included: requests are rejected (or, with useCredits, paid from prepaid credits) until the period renews.

ApiKeyUsageReport​

FieldTypeRequiredDescription
workspaceIdstryesThe workspace the usage belongs to.
apiKeyIdstr | NoneThe API key the report is scoped to.
from_stryesFirst reported day (inclusive), YYYY-MM-DD (UTC).
tostryesLast reported day (inclusive), YYYY-MM-DD (UTC).
totalQuantityintyesSum of all daily quantities in the range.
dayslist[Day]yesOne entry per day with recorded usage, ascending.
capdict[str, Cap] | NoneReal-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​

FieldTypeRequiredDescription
tokenstryesThe Stripe customer-session client secret for the embedded component.

BillingPortalSession​

FieldTypeRequiredDescription
urlstryesThe Stripe billing-portal session URL to redirect to.

StripeRegion​

Enumeration: 'eu', 'us'

BillingPONumbers​

FieldTypeRequiredDescription
carmenstr | NonePO number for Carmen Recognition Service invoices.
prstr | NonePO number for Carmen ID Recognition Service invoices.

BillingProfile​

FieldTypeRequiredDescription
stripeRegionStripeRegionyesLocked Stripe billing account.
stripeCustomerIdstryesProvisioned Stripe customer id.
billingPONumbersBillingPONumbers | None

ProductId​

Enumeration: 'carmen', 'pr'

BillingProfileRequest​

FieldTypeRequiredDescription
stripeRegionStripeRegion | NoneBilling account selected before the first purchase. Once stored, it cannot be changed.
poNumberstr | NoneOptional purchase order number for productId. Send an empty string to remove it.
productIdProductId | NoneProduct whose invoices use the PO number.

Role​

Enumeration: 'ADMIN', 'EDITOR', 'ACCOUNTANT'

Products1​

FieldTypeRequiredDescription
enabledboolyesWhether the key may call the product.
limitsdict[str, float] | NonePer-subscription-type call limits (e.g. carmen_freeflow, carmen_go).
apisdict[str, Apis] | NonePer-API settings of the product (e.g. vehicle, transport, pr22).

CreateApiKeyRequest​

FieldTypeRequiredDescription
namestryesDisplay name.
roleRole | NoneWorkspace-management role of the key; omit for none.
productsdict[str, Products1] | NoneProduct access per product id; omit for none.

CreateHookRequest​

FieldTypeRequiredDescription
hookUrlstryesThe webhook endpoint URL; must start with http:// or https://.
apisdict[str, bool]yesAPI name → subscribe flag. At least one API must be true; each subscribed API (except usages) must have storage enabled.

DeleteResult​

RootModel[str]

ErrorResponse​

FieldTypeRequiredDescription
messagestryesHuman-readable error description.

Status​

Enumeration: 'pending_confirmation', 'confirmed', 'deleted'

Protocol​

Enumeration: 'http', 'https'

Hook​

FieldTypeRequiredDescription
statusStatusyesSubscription state. New hooks start pending_confirmation until the endpoint confirms the SNS subscription.
protocolProtocolyesDerived from the hook URL.
hookUrlstryesThe webhook endpoint URL (stored lowercased).
apisdict[str, bool]yesThe APIs the hook subscribes to; only subscribed APIs are listed (value always true).
topicNamestryesThe workspace SNS topic name.
topicArnstryesThe workspace SNS topic ARN.

HookApisPatch​

RootModel[dict[str, bool]]

HookList​

RootModel[list[Hook]]

Status1​

Enumeration: 'pending'

InvitationSentResult​

FieldTypeRequiredDescription
workspaceIdstryesThe workspace.
emailstryesThe invited email address.
rolestryesThe offered role. Known values: ADMIN, EDITOR, ACCOUNTANT; others may appear.
statusStatus1yesAlways pending.
messagestryesHuman-readable confirmation.

InviteUserRequest​

FieldTypeRequiredDescription
emailstryesThe email address to invite.
roleRole | NoneThe offered role. Defaults to EDITOR; OWNER cannot be invited.

Usage​

FieldTypeRequiredDescription
dimensionstryesThe subscribed tier/dimension.
totalfloatyesUsage reported to Stripe so far.
includedfloatyesUsage included in the subscription.
overagefloatyesBillable usage above the included allowance.
creditPaidfloatyesLookups paid from prepaid credits after the hard cap; never billed as overage.
waivedfloatyesOverage above the allowance the usage hard cap waived.
capEnabledboolyesWhether the usage hard cap is on for the product.

Line​

FieldTypeRequiredDescription
descriptionstryesInvoice line description.
quantityfloat | NoneLine quantity.
subtotalfloatyesLine subtotal in the currency minor unit.
discountfloatyesLine discount in the currency minor unit.
taxfloatyesLine tax in the currency minor unit.
currencystryesThree-letter lowercase ISO currency code.
periodStartfloatyesLine period start, epoch seconds.
periodEndfloatyesLine period end, epoch seconds.
overageboolyesWhether this is the calculated usage line.

Invoice​

FieldTypeRequiredDescription
currencystryesThree-letter lowercase ISO currency code.
subtotalfloatyesSubtotal in the currency minor unit.
discountfloatyesTotal discounts in the currency minor unit.
taxfloatyesTotal tax in the currency minor unit.
totalfloatyesInvoice total in the currency minor unit.
amountDuefloatyesExpected amount due in the currency minor unit.
automaticTaxStatusstr | NoneStripe automatic-tax calculation status.
lineslist[Line]yesPreview invoice lines.

InvoicePreview​

FieldTypeRequiredDescription
generatedAtfloatyesPreview generation time, epoch seconds.
usageThroughfloatyesHourly query boundary, epoch seconds; only usage already present in Stripe is included.
invoiceAtfloatyesExpected current billing-period end, epoch seconds.
productIdProductIdyesThe metered product.
subscriptionIdstryesStripe subscription id.
cancelAtPeriodEndboolyesWhether the subscription ends after the current billing period.
usageUsage
invoiceInvoice

MessageResponse​

FieldTypeRequiredDescription
messagestryesHuman-readable confirmation.

StorageStatus​

FieldTypeRequiredDescription
enabledApisdict[str, bool]yesAPIs with event storage enabled; only enabled APIs are listed (value always true).
topicArnstr | NoneyesThe workspace SNS topic ARN when at least one webhook exists; null otherwise.

StorageStatusPatch​

RootModel[dict[str, bool]]

Event​

FieldTypeRequiredDescription
eventdict[str, Any] | NoneThe stored recognition event payload, as produced by the recognition API.
attachmentURLslist[str] | NonePre-signed URLs of stored attachments (e.g. images).
creationTimestampfloatyesWhen the event was stored, epoch milliseconds.
requestIdstryesThe originating request id.
apistryesThe API that produced the event.
customDatastr | NoneThe caller-supplied custom data of the original request, if any.
userAgentstr | NoneUser agent of the original request.
ipAddressstr | NoneCaller IP address of the original request.

StoredEventPage​

FieldTypeRequiredDescription
eventslist[Event]yesThe stored events of this page.
continuationTokenstr | NoneyesOpaque token for the next page; null when there are no more events. Pass it back as the continuation-token query parameter.

TransferResult​

FieldTypeRequiredDescription
workspaceIdstryesThe transferred workspace.
previousOwnerstryesCognito user id of the previous owner.
newOwnerstryesCognito user id of the new owner.
messagestryesHuman-readable confirmation.

Products2​

FieldTypeRequiredDescription
enabledboolyesWhether the key may call the product.
limitsdict[str, float] | NonePer-subscription-type call limits (e.g. carmen_freeflow, carmen_go).
apisdict[str, Apis] | NonePer-API settings of the product (e.g. vehicle, transport, pr22).

UpdateApiKeyRequest​

FieldTypeRequiredDescription
namestryesDisplay name.
roleRole | NoneWorkspace-management role of the key; omit for none.
productsdict[str, Products2] | NoneProduct access per product id; omit for none.

UpdateUserRoleRequest​

FieldTypeRequiredDescription
roleRoleyesThe new role; OWNER cannot be assigned (transfer ownership instead).

UsageCapRequest​

FieldTypeRequiredDescription
productIdProductIdyesThe metered product.
enabledboolyes"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.
useCreditsbool | 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​

FieldTypeRequiredDescription
enabledboolyesAlways true while stored; disabling removes the setting.
useCreditsboolyesWhether requests continue from the workspace's prepaid credits once the included lookups are used up ("Use prepaid credits after the limit"). Explicit opt-in.
anchorfloatyesUsage reference fixed when the cap was switched on (max(included, used so far)); overage accumulated before that point stays billable.
anchorPeriodIdstryesThe billing period the anchor was taken in (<start>_<end>).
enabledAtfloatyesWhen the cap was switched on, epoch milliseconds.
enabledBystr | NoneCognito user id of who switched it on.

Status2​

FieldTypeRequiredDescription
enabledboolyesWhether the usage hard cap ("Stop at plan limit") is on for the product.
useCreditsboolyesWhether prepaid credits are used after the limit.
includedfloatyesLookups included in the current billing period.
usedfloatyesBillable lookups used so far in the period (real time, all API keys).
remainingfloatyesmax(0, included - used).
creditsRemainingfloatyesPrepaid credit balance of the product.
periodIdstryesThe current billing period (<start>_<end>).
periodEndstryesWhen the period renews, YYYY-MM-DD (UTC).
reachedboolyesenabled and used >= included: requests are rejected (or, with useCredits, paid from prepaid credits) until the period renews.

UsageCapResult​

FieldTypeRequiredDescription
productIdProductIdyesThe metered product.
settingSetting | NoneA usage hard cap setting.
statusStatus2yesThe real-time billing-period status of one metered product.

UsageReport​

FieldTypeRequiredDescription
workspaceIdstryesThe workspace the usage belongs to.
from_stryesFirst reported day (inclusive), YYYY-MM-DD (UTC).
tostryesLast reported day (inclusive), YYYY-MM-DD (UTC).
totalQuantityintyesSum of all daily quantities in the range.
dayslist[Day]yesOne entry per day with recorded usage, ascending.
capdict[str, Cap] | NoneReal-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​

FieldTypeRequiredDescription
pathstr | NoneThe offending parameter, e.g. from.
messagestr | NoneWhat is wrong with it.

ValidationError​

FieldTypeRequiredDescription
messagestryesHuman-readable error description.
issueslist[Issue] | NonePer-parameter validation problems (present on query validation errors).

BillingPONumbers1​

FieldTypeRequiredDescription
carmenstr | NonePO number printed on Carmen Recognition Service invoices.
prstr | NonePO number printed on Carmen ID Recognition Service invoices.

UsageCaps​

FieldTypeRequiredDescription
enabledboolyesAlways true while stored; disabling removes the setting.
useCreditsboolyesWhether requests continue from the workspace's prepaid credits once the included lookups are used up ("Use prepaid credits after the limit"). Explicit opt-in.
anchorfloatyesUsage reference fixed when the cap was switched on (max(included, used so far)); overage accumulated before that point stays billable.
anchorPeriodIdstryesThe billing period the anchor was taken in (<start>_<end>).
enabledAtfloatyesWhen the cap was switched on, epoch milliseconds.
enabledBystr | NoneCognito user id of who switched it on.

Subscriptions​

FieldTypeRequiredDescription
idstryesStripe subscription id.
currentPeriodStartfloat | NoneCurrent period start, epoch seconds.
currentPeriodEndfloat | NoneCurrent period end, epoch seconds.
cancelAtPeriodEndbool | NoneWhether the subscription ends at period end.
dimensionstr | NoneSubscribed dimension id.
limitint | NoneRequest allowance of the dimension.
quantityint | NoneSubscribed quantity.
subscriptionScheduleIdstr | NoneStripe subscription schedule id, when a downgrade/change is scheduled.
nextDimensionstr | NoneDimension taking effect next period, if scheduled.
nextLimitint | NoneAllowance taking effect next period, if scheduled.
nextQuantityint | NoneQuantity taking effect next period, if scheduled.

Workspace​

FieldTypeRequiredDescription
workspaceIdstryesThe workspace id.
namestryesDisplay name.
ownerstryesCognito user id of the owner.
ownerEmailstr | NoneEmail address of the owner.
stripeCustomerIdstr | NoneStripe customer id, once ever billed via Stripe.
billingPONumbersBillingPONumbers1 | None
marketplaceCustomerIdstr | NoneAWS Marketplace customer id, if any.
stripeRegionStripeRegion | NoneThe Stripe billing account region.
marketplaceAccountstr | NoneAWS Marketplace account, if any.
freeCallCountsdict[str, float] | NoneRemaining free/credit calls per product id.
usageCapsdict[str, UsageCaps] | NoneThe 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.
subscriptionsdict[str, Subscriptions] | NoneActive subscriptions per subscription type (e.g. carmen, carmen_freeflow, carmen_go, pr).
stripeCustomerdict[str, Any] | NoneThe raw Stripe customer object, when available.
hasPendingPaymentsbool | NoneWhether the Stripe customer has payment intents awaiting completion.

WorkspaceNameRequest​

FieldTypeRequiredDescription
namestryesThe workspace display name.

Status3​

Enumeration: 'active', 'pending', 'rejected'

WorkspaceUser​

FieldTypeRequiredDescription
workspaceIdstryesThe workspace.
userIdstryesCognito user id (a placeholder id while the invitation is pending).
emailstr | NoneEmail address.
rolestryesRole in the workspace. Known values: OWNER, ADMIN, EDITOR, ACCOUNTANT; others may appear.
statusStatus3yesMembership state.
createdAtfloat | NoneInvitation time, epoch milliseconds.
acceptedAtfloat | NoneAcceptance time, epoch milliseconds.
rejectedAtfloat | NoneRejection time, epoch milliseconds.
invitedBystr | NoneCognito user id of the inviter.
isOwnerboolyesWhether this member owns the workspace.
namestr | NoneFull name (from Cognito, active members only).
givenNamestr | NoneGiven name (from Cognito).
familyNamestr | NoneFamily name (from Cognito).
inviterNamestr | NoneFull name of the inviter (from Cognito).

WorkspaceUserList​

RootModel[list[WorkspaceUser]]