# Models: C

> API models starting with C.

## `Call`

- `run_id: str` (`runId` on the wire)
- `node_id: str | None` (`nodeId` on the wire) (optional)
- `scope: str | None` (optional)
- `tool_id: str` (`toolId` on the wire)
- `arguments: Any | None` (optional)
- `result: Any | None` (optional)
- `from_event: Optional[Literal[True]]` (`fromEvent` on the wire) (optional)

## `CallDifferenceCount`

One way a run's calls differed from a correction; it can quote argument values.

- `tool: str`
- `kind: Literal['count']`
- `expected: int`
- `actual: int`
- `refused: int | None` (optional)

## `CallDifferenceFieldValue`

One way a run's calls differed from a correction; it can quote argument values.

- `tool: str`
- `kind: Literal['field-value']`
- `field: str`
- `expected: Any`
- `actual: Any`
- `refused: bool | None` (optional)

## `CallDifferenceMissingField`

One way a run's calls differed from a correction; it can quote argument values.

- `tool: str`
- `kind: Literal['missing-field']`
- `field: str`
- `expected: Any`
- `refused: bool | None` (optional)

## `CallDifferenceMustNotCall`

One way a run's calls differed from a correction; it can quote argument values.

- `tool: str`
- `kind: Literal['must-not-call']`
- `actual: int`
- `refused: int | None` (optional)

## `CallUsage`

- `usage: kindgi.client.ModelCallTokens`
- `cost_usd: float | None` (`costUsd` on the wire) (optional)
- `duration_ms: int | None` (`durationMs` on the wire) (optional)
- `served_model: str | None` (`servedModel` on the wire) (optional)

## `CandidateItem`

An output's score: Σ yesWeight and Σ totalWeight over its judged items, and over those among the first `k` ranked items.

- `yes_weight: float` (`yesWeight` on the wire)
- `total_weight: float` (`totalWeight` on the wire)
- `items: int`
- `judged_items: int` (`judgedItems` on the wire)
- `top_k: kindgi.client.TopK` (`topK` on the wire)
- `fresh: kindgi.client.Fresh | None` (optional)

## `Capability`

- `root: str`

## `Capability4`

Capability declaration — see `@kindgi/capabilities`. Additional properties are permitted so new capability kinds do not require a wire change.

## `Capability5`

- `root: str`

## `CapabilityCollectionPage`

- `data: list[kindgi.client.CapabilityDescriptor]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `CapabilityDescriptor`

- `id: str`
- `feature: Union[str, Annotated[Union[Literal['structured-output', 'vision', 'audio-input', 'audio-output', 'tool-use', 'parallel-tool-use', 'thinking', 'long-context', 'code-execution', 'web-search', 'file-search', 'streaming', 'batch'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]`
- `description: str`
- `kind: str | None` (optional)
- `params_schema: dict[str, Any] | None` (`paramsSchema` on the wire) (optional)
- `providers: list[kindgi.client.CapabilityProvider] | None` (optional)

## `CapabilityProvider`

A provider of the tenant with a model that has the feature.

- `provider_id: str` (`providerId` on the wire)
- `models: list[str]`

## `Change`

- `block_id: str` (`blockId` on the wire)
- `content: kindgi.client.Content1`

## `Changes`

The first repetition's items against the judged ones.

- `kept: list[kindgi.client.KeptItem]`
- `dropped: list[kindgi.client.DroppedItem]`
- `new: list[kindgi.client.NewItem]`

## `ClaimMappingScopesSpec`

Claim path + optional delimiter for extracting Kindgi OAuth scopes from provider claims. When absent, scopes come from the token response `scope` field instead.

- `claim: str`
- `delimiter: str | None` (optional)

## `ClaimMappingSpec`

Per-provider claim mapping. All fields optional; closer to OIDC defaults (sub/email/name) → fewer overrides needed.

- `user_id: str | None` (`userId` on the wire) (optional)
- `email: str | None` (optional)
- `display_name: str | None` (`displayName` on the wire) (optional)
- `scopes: kindgi.client.ClaimMappingScopesSpec | None` (optional)
- `metadata: list[kindgi.client.Metadatum] | None` (optional)

## `CodeArtifactRefFilesystem`

Handler-artifact pointer. Discriminated on `kind`: `oci` is the deploy-pipeline shape (image + module path + artifactVersion); `filesystem` is the local-development shape — absolute host path at the pack's on-disk handler file. Production servers SHOULD reject `filesystem`.

- `kind: Literal['filesystem']`
- `module_path: str` (`modulePath` on the wire)

## `CodeArtifactRefOci`

Handler-artifact pointer. Discriminated on `kind`: `oci` is the deploy-pipeline shape (image + module path + artifactVersion); `filesystem` is the local-development shape — absolute host path at the pack's on-disk handler file. Production servers SHOULD reject `filesystem`.

- `kind: Literal['oci']`
- `image_ref: str` (`imageRef` on the wire)
- `module_path: str` (`modulePath` on the wire)
- `artifact_version: str` (`artifactVersion` on the wire)

## `CodeArtifactRefUnrecognized`

A `kind` this client doesn't know yet, from a newer runtime: the object as it came, every field kept.

- `kind: str`

## `Comparison`

- `max_age_hours: float | None` (`maxAgeHours` on the wire) (optional)
- `suite: kindgi.client.Suite | None` (optional)

## `Comparison1`

- `eval_run_id: uuid.UUID | None` (`evalRunId` on the wire) (optional)
- `role: Union[Literal['reference', 'candidate', 'proof'], str]`
- `part: Union[Literal['search', 'hold-out'], str]`
- `block_id: str | None` (`blockId` on the wire) (optional)
- `changed: dict[str, Any] | None` (optional)
- `score: float | None` (optional)
- `failed: str | None` (optional)
- `refused: list[kindgi.client.RefusedItem] | None` (optional)
- `hypothesis: str | None` (optional)

## `ComparisonCandidateAgent`

What ran on the cases: an agent version, or a flow version (with any versions it swapped in).

- `kind: Literal['agent']`
- `agent_id: str` (`agentId` on the wire)
- `version: str`
- `pins_digest: str | None` (`pinsDigest` on the wire) (optional)
- `overrides: kindgi.client.Overrides | None` (optional)

## `ComparisonCandidateFlow`

What ran on the cases: an agent version, or a flow version (with any versions it swapped in).

- `kind: Literal['flow']`
- `flow_id: str` (`flowId` on the wire)
- `version: str`
- `versions: kindgi.client.FlowVersionOverrides | None` (optional)

## `ComparisonCaseResult`

One case of a comparison: its replay runs, the scores, the items kept, dropped and new, the tool calls, and why it didn't run when it didn't.

- `case_id: str` (`caseId` on the wire)
- `run_ids: list[str]` (`runIds` on the wire)
- `baseline: kindgi.client.ComparisonCaseResultBaseline`
- `candidate: list[kindgi.client.CandidateItem]`
- `changes: kindgi.client.Changes | None` (optional)
- `tools: list[kindgi.client.ComparisonCaseResultTool] | None` (optional)
- `corrections: list[kindgi.client.ComparisonCaseResultCorrection] | None` (optional)
- `correction_differences: list[kindgi.client.CorrectionDifference] | None` (`correctionDifferences` on the wire) (optional)
- `cost_usd: list[kindgi.client.CostUsdItem] | None` (`costUsd` on the wire) (optional)
- `diverged: bool`
- `refused_writes: int` (`refusedWrites` on the wire)
- `no_context: bool` (`noContext` on the wire)
- `approval_skipped: bool` (`approvalSkipped` on the wire)
- `error: str | None` (optional)
- `stopped: kindgi.client.Stopped | None` (optional)
- `rescored: Optional[Literal[False]]` (optional)

## `ComparisonCaseResultBaseline`

An output's score: Σ yesWeight and Σ totalWeight over its judged items, and over those among the first `k` ranked items.

- `yes_weight: float` (`yesWeight` on the wire)
- `total_weight: float` (`totalWeight` on the wire)
- `items: int`
- `judged_items: int` (`judgedItems` on the wire)
- `top_k: kindgi.client.TopK` (`topK` on the wire)
- `fresh: kindgi.client.Fresh | None` (optional)

## `ComparisonCaseResultCorrection`

- `judgment_id: str` (`judgmentId` on the wire)
- `pass_: bool` (`pass` on the wire)
- `repetitions_passed: int` (`repetitionsPassed` on the wire)
- `repetitions: int`

## `ComparisonCaseResultTool`

- `step: int`
- `call_id: str` (`callId` on the wire)
- `tool_id: str` (`toolId` on the wire)
- `tool_version: str` (`toolVersion` on the wire)
- `arguments: Any`
- `source: Literal['live', 'recorded', 'refused']`
- `recomputed: bool | None` (optional)
- `reason: str | None` (optional)

## `ComparisonMetric`

One metric, the recorded runs beside the candidate. `null` where a side had no judged evidence; `n` / `weight` are the candidate's evidence (cases with judged items, and the judgment weight behind them), `baselineN` / `baselineWeight` the recorded side's.

- `baseline: float | None`
- `candidate: float | None`
- `delta: float | None`
- `n: int`
- `weight: float`
- `baseline_n: int` (`baselineN` on the wire)
- `baseline_weight: float` (`baselineWeight` on the wire)
- `direction: Literal['higher']`
- `k: int | None` (optional)
- `spread: float | None` (optional)
- `fresh_weight: float | None` (`freshWeight` on the wire) (optional)

## `CompleteApprovalBody`

- `decision: Literal['approve', 'reject', 'escalate', 'withdraw']`
- `rationale: str | None` (optional)
- `value: Any | None` (optional)

## `CompleteApprovalResult`

A recorded decision, and what it did to the run waiting on the approval. `runStatus` is the run's status when the decision couldn't resolve its waitpoint because the run had already ended (e.g. `cancelled` after the decision was recorded); the decision stands.

- `kind: Union[Literal['terminal', 'escalated'], str]`
- `approval: kindgi.client.Approval`
- `decision: kindgi.client.ReviewDecision`
- `next_approval: kindgi.client.Approval | None` (`nextApproval` on the wire) (optional)
- `waitpoint_resolved: bool` (`waitpointResolved` on the wire)
- `run_status: Optional[Annotated[Union[Literal['pending', 'running', 'suspended', 'completed', 'failed', 'cancelled'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (`runStatus` on the wire) (optional)
- `resume: Optional[Annotated[kindgi.client.CompleteApprovalResultResumeOk | kindgi.client.CompleteApprovalResultResumeFailed | kindgi.client.CompleteApprovalResultResumeUnrecognized, <kindgi.client._open.OpenUnion object at 0x10c16b690>]]` (optional)

## `CompleteApprovalResultResumeFailed`

How the run went on, when this call resumed it (the runtime resumes inline): `ok`, or `failed` with the run's error, e.g. `tool-version-unresolvable` when a tool version the turn started with is gone, or `rate-limit-exceeded` when a budget kept per tenant refused work the turn needed. The decision stands either way.

- `kind: Literal['failed']`
- `code: str`
- `message: str`

## `CompleteApprovalResultResumeOk`

How the run went on, when this call resumed it (the runtime resumes inline): `ok`, or `failed` with the run's error, e.g. `tool-version-unresolvable` when a tool version the turn started with is gone, or `rate-limit-exceeded` when a budget kept per tenant refused work the turn needed. The decision stands either way.

- `kind: Literal['ok']`

## `CompleteApprovalResultResumeUnrecognized`

A `kind` this client doesn't know yet, from a newer runtime: the object as it came, every field kept.

- `kind: str`

## `ComplianceEvidence`

One evidence record — matches `@kindgi/specs/compliance-evidence.schema.json` (`payload` is a versioned document opaque to the wire schema).

- `id: str`
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `kind: str`
- `timestamp: AwareDatetime`
- `actor: kindgi.client.Actor | None` (optional)
- `subject: kindgi.client.Subject1 | None` (optional)
- `outcome: Optional[Annotated[Union[Literal['allowed', 'denied', 'succeeded', 'failed', 'escalated'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (optional)
- `payload: dict[str, Any]`
- `provenance_ref: kindgi.client.ProvenanceRef2 | None` (`provenanceRef` on the wire) (optional)
- `signature: kindgi.client.Signature1 | None` (optional)

## `ComplianceEvidenceCollectionPage`

- `data: list[kindgi.client.ComplianceEvidence]`
- `has_more: bool` (`hasMore` on the wire)
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)

## `ConnectFinish`

- `kind: Union[Literal['connected', 'declined', 'pick-installation'], str]`
- `request: kindgi.client.ConnectRequest`
- `connection: kindgi.client.Connection | None` (optional)
- `reviewer_seat: bool | None` (`reviewerSeat` on the wire) (optional)

## `ConnectRequest`

A connect: the owner goes to `connectUrl`, consents at the app, and comes back. A run that needs a connection it lacks waits on one.

- `request_id: uuid.UUID` (`requestId` on the wire)
- `env_name: str` (`envName` on the wire)
- `app_id: uuid.UUID` (`appId` on the wire)
- `app: str`
- `owner: kindgi.client.ConnectionOwner`
- `permissions: list[str]`
- `says: list[str]`
- `reconnects: uuid.UUID | None` (optional)
- `run_id: str | None` (`runId` on the wire) (optional)
- `name: str | None` (optional)
- `started_by: str | None` (`startedBy` on the wire) (optional)
- `state: Union[Literal['pending', 'connected', 'declined', 'expired', 'failed'], str]`
- `failure: str | None` (optional)
- `missing: list[str] | None` (optional)
- `installations: list[kindgi.client.ConnectRequestInstallation] | None` (optional)
- `connection_id: uuid.UUID | None` (`connectionId` on the wire) (optional)
- `connect_url: AnyUrl` (`connectUrl` on the wire)
- `expires_at: AwareDatetime` (`expiresAt` on the wire)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `created_by: str` (`createdBy` on the wire)

## `ConnectRequestInstallation`

A GitHub App installation the person can reach.

- `installation_id: str` (`installationId` on the wire)
- `account: kindgi.client.ConnectionAccount`

## `ConnectStart`

- `authorize_url: AnyUrl` (`authorizeUrl` on the wire)

## `Connection`

One owner's account at an app, through a registration, in one env. Never its token.

- `connection_id: uuid.UUID` (`connectionId` on the wire)
- `env_name: str` (`envName` on the wire)
- `app_id: uuid.UUID` (`appId` on the wire)
- `app: str`
- `owner: kindgi.client.ConnectionOwner`
- `account: kindgi.client.ConnectionAccount`
- `permissions: list[str]`
- `state: Union[Literal['working', 'needs-reconnecting', 'removing', 'removed'], str]`
- `state_reason: str | None` (`stateReason` on the wire) (optional)
- `installation_id: str | None` (`installationId` on the wire) (optional)
- `access_ends_at: AwareDatetime | None` (`accessEndsAt` on the wire) (optional)
- `connected_at: AwareDatetime` (`connectedAt` on the wire)
- `last_used_at: AwareDatetime | None` (`lastUsedAt` on the wire) (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `created_by: str` (`createdBy` on the wire)
- `updated_at: AwareDatetime` (`updatedAt` on the wire)
- `removed_at: AwareDatetime | None` (`removedAt` on the wire) (optional)
- `removed_by: str | None` (`removedBy` on the wire) (optional)
- `removed_reason: Optional[Annotated[Union[Literal['disconnected', 'revoked-at-app', 'uninstalled', 'registration-removed', 'replaced'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (`removedReason` on the wire) (optional)
- `withdrawn: Optional[Annotated[Union[Literal['at-app', 'app-failed', 'kept-for-other-connection', 'not-supported'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (optional)

## `ConnectionAccount`

Whose account a connection is at the app.

- `id: str`
- `label: str`

## `ConnectionApp`

A tenant's registration of its own client at an app. Secrets are references, never values.

- `app_id: uuid.UUID` (`appId` on the wire)
- `app: str`
- `label: str | None` (optional)
- `oauth2: kindgi.client.ConnectionOAuth2App | None` (optional)
- `github_app: kindgi.client.ConnectionGitHubApp | None` (`githubApp` on the wire) (optional)
- `projects: list[str] | None` (optional)
- `redirect_url: AnyUrl` (`redirectUrl` on the wire)
- `notices_url: AnyUrl` (`noticesUrl` on the wire)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `updated_at: AwareDatetime` (`updatedAt` on the wire)
- `removed_at: AwareDatetime | None` (`removedAt` on the wire) (optional)

## `ConnectionAppPage`

- `data: list[kindgi.client.ConnectionApp]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `ConnectionAppRemoved`

- `connections_removed: int` (`connectionsRemoved` on the wire)

## `ConnectionEntry`

An app this server can connect to.

- `id: str`
- `name: str`
- `owners: list[Annotated[Union[Literal['member', 'company'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]`
- `sign_in: kindgi.client.SignIn` (`signIn` on the wire)
- `permissions: dict[str, kindgi.client.ConnectionEntryPermission]`
- `removal: kindgi.client.Removal | None` (optional)
- `setup_guide: str` (`setupGuide` on the wire)

## `ConnectionEntryList`

- `data: list[kindgi.client.ConnectionEntry]`

## `ConnectionEntryPermission`

- `says: str`
- `changes: bool`

## `ConnectionEntrySignInTenant`

Present when the sign-in happens in a directory of the app's own (Microsoft's tenant, not a Kindgi tenant). A registration's `oauth2.tenant` names it; without `default`, each registration must give its own.

- `default: str | None` (optional)

## `ConnectionGitHubApp`

- `app_number: int` (`appNumber` on the wire)
- `slug: str`
- `client_id: str` (`clientId` on the wire)
- `client_secret: kindgi.client.ConnectionSecretRef` (`clientSecret` on the wire)
- `private_key: kindgi.client.ConnectionSecretRef` (`privateKey` on the wire)
- `webhook_secret: kindgi.client.ConnectionSecretRef` (`webhookSecret` on the wire)

## `ConnectionNeed`

- `app: str`
- `permissions: list[kindgi.client.Permission]`
- `as_: Union[Literal['person', 'company'], str]` (`as` on the wire)

## `ConnectionOAuth2App`

- `client_id: str` (`clientId` on the wire)
- `client_secret: kindgi.client.ConnectionSecretRef` (`clientSecret` on the wire)
- `tenant: str | None` (optional)

## `ConnectionOwner`

Who owns a connection: one member (`kind: member`, with their `userId`), or the company (`kind: company`, the tenant's own account).

- `kind: Union[Literal['member', 'company'], str]`
- `user_id: str | None` (`userId` on the wire) (optional)

## `ConnectionPage`

- `data: list[kindgi.client.Connection]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `ConnectionSecretRef`

A secret by name in the deployment's secrets store, resolved at tenant scope. The registration keeps only this reference, never the value.

- `env_name: str` (`envName` on the wire)
- `name: str`

## `ConsoleLink`

One of the deployment's own links, which the console shows on every page.

- `label: str`
- `url: AnyUrl`

## `Content`

The new content: `{ values }` for a settings block (its schema carries over), `{ template }` for a prompt block (its parameters carry over).

- `values: dict[str, Any] | None` (optional)
- `template: str | None` (optional)

## `Content1`

`{ values }` for a settings block (they must satisfy its schema), `{ template }` for a prompt block.

- `values: dict[str, Any] | None` (optional)
- `template: str | None` (optional)

## `Conversation`

- `id: uuid.UUID`
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `agent_id: str` (`agentId` on the wire)
- `agent_version: str` (`agentVersion` on the wire)
- `title: str`
- `participant_id: str | None` (`participantId` on the wire) (optional)
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `opened_by: str | None` (`openedBy` on the wire) (optional)
- `scope: dict[str, Any]`
- `status: Union[Literal['open', 'closed'], str]`
- `opened_at: AwareDatetime` (`openedAt` on the wire)
- `closed_at: AwareDatetime | None` (`closedAt` on the wire) (optional)
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)
- `turn_count: int` (`turnCount` on the wire)
- `last_message_at: AwareDatetime | None` (`lastMessageAt` on the wire) (optional)
- `metadata: dict[str, Any] | None` (optional)

## `ConversationCollectionPage`

- `data: list[kindgi.client.Conversation]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)
- `opened_by: Optional[Annotated[Union[Literal['me'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (`openedBy` on the wire) (optional)

## `ConversationMessage`

- `sequence: int`
- `role: Union[Literal['user', 'agent', 'tool', 'system'], str]`
- `content: Any`
- `tool_call: kindgi.client.ToolCall | None` (`toolCall` on the wire) (optional)
- `actor: str | None` (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)

## `ConversationMessageCollectionPage`

- `data: list[kindgi.client.ConversationMessage]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `ConversationPolicy`

- `history_limit: int | None` (`historyLimit` on the wire) (optional)
- `hitl_after_turns: int | None` (`hitlAfterTurns` on the wire) (optional)

## `ConversationStatus`

- `root: Literal['open', 'closed']`

## `Correction`

An expert's correction of a run's decisions: the tool calls the agent should have made, and the tools it should not have called at all. Graded deterministically on a replay. A tool can't be in both `calls` and `notCalled`, and one of them must be non-empty (both empty is a 400).

- `calls: list[kindgi.client.ExpectedCall]`
- `not_called: list[kindgi.client.NotCalledItem]` (`notCalled` on the wire)

## `CorrectionDifference`

- `judgment_id: str` (`judgmentId` on the wire)
- `repetition: int`
- `differences: list[kindgi.client.CallDifferenceCount | kindgi.client.CallDifferenceMustNotCall | kindgi.client.CallDifferenceMissingField | kindgi.client.CallDifferenceFieldValue]`

## `Corrections`

Corrections graded across the cases: shown for a promotion gate, not enforced. Absent when the test set carries no corrections.

- `checked: int`
- `passed: int`
- `judgments: list[kindgi.client.JudgedComparisonSummaryCorrectionsJudgment] | None` (optional)

## `CostAggregateGroup`

- `key: dict[str, str | None]`
- `count: int`
- `total_usd: float` (`totalUsd` on the wire)
- `tokens: kindgi.client.CostTokenTotals`

## `CostAggregateResult`

- `groups: list[kindgi.client.CostAggregateGroup]`
- `total_groups: int | None` (`totalGroups` on the wire) (optional)
- `truncated: bool | None` (optional)
- `total_usd: float` (`totalUsd` on the wire)
- `total_records: int` (`totalRecords` on the wire)
- `tokens: kindgi.client.CostTokenTotals`
- `time_range: kindgi.client.TimeRange` (`timeRange` on the wire)
- `group_by: list[Annotated[Union[Literal['agentId', 'runId', 'category', 'providerId', 'day', 'month', 'tenant', 'conversationId', 'model', 'servedModel', 'projectId', 'orgId', 'rootRunId', 'flowId'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (`groupBy` on the wire)

## `CostRecord`

- `id: str`
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `category: str`
- `provider_id: str | None` (`providerId` on the wire) (optional)
- `run_id: uuid.UUID | None` (`runId` on the wire) (optional)
- `agent_id: str | None` (`agentId` on the wire) (optional)
- `conversation_id: uuid.UUID | None` (`conversationId` on the wire) (optional)
- `quantity: float`
- `unit: str`
- `cost_usd: float | None` (`costUsd` on the wire) (optional)
- `occurred_at: AwareDatetime` (`occurredAt` on the wire)
- `metrics: dict[str, Any] | None` (optional)
- `attributes: dict[str, Any] | None` (optional)
- `call_id: str | None` (`callId` on the wire) (optional)
- `project_id: uuid.UUID | None` (`projectId` on the wire) (optional)
- `root_run_id: uuid.UUID | None` (`rootRunId` on the wire) (optional)
- `parent_run_id: uuid.UUID | None` (`parentRunId` on the wire) (optional)
- `agent_version: str | None` (`agentVersion` on the wire) (optional)
- `flow_id: str | None` (`flowId` on the wire) (optional)
- `node_id: str | None` (`nodeId` on the wire) (optional)
- `step: int | None` (optional)
- `purpose: str | None` (optional)
- `model: str | None` (optional)
- `served_model: str | None` (`servedModel` on the wire) (optional)
- `fallback: bool | None` (optional)
- `status: Optional[Annotated[Union[Literal['ok', 'failed'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]` (optional)
- `usage: kindgi.client.ModelCallTokens | None` (optional)
- `thinking: kindgi.client.ModelCallThinking | None` (optional)
- `duration_ms: int | None` (`durationMs` on the wire) (optional)
- `finish_reason: str | None` (`finishReason` on the wire) (optional)
- `provider_request_id: str | None` (`providerRequestId` on the wire) (optional)
- `attempts: int | None` (optional)
- `error: kindgi.client.ModelCallError | None` (optional)
- `raw_usage: kindgi.client.RawUsage | None` (`rawUsage` on the wire) (optional)

## `CostRecordCollectionPage`

- `data: list[kindgi.client.CostRecord]`
- `next_cursor: str | None` (`nextCursor` on the wire) (optional)
- `has_more: bool` (`hasMore` on the wire)

## `CostTokenTotals`

- `prompt: int`
- `completion: int`
- `cache_read: int` (`cacheRead` on the wire)
- `cache_write: int` (`cacheWrite` on the wire)
- `reasoning: int`

## `CostUsdItem`

- `root: float`

## `CreateConnectRequestBody`

- `app: str`
- `app_id: uuid.UUID | None` (`appId` on the wire) (optional)
- `project_id: str | None` (`projectId` on the wire) (optional)
- `permissions: list[str]`
- `for_: Optional[Literal['me', 'company']]` (`for` on the wire) (optional)

## `CreateConnectionAppBody`

Give `oauth2` for an app that signs in with OAuth, `githubApp` for a GitHub App.

- `app: str`
- `label: str | None` (optional)
- `oauth2: kindgi.client.ConnectionOAuth2App | None` (optional)
- `github_app: kindgi.client.ConnectionGitHubApp | None` (`githubApp` on the wire) (optional)
- `projects: list[str] | None` (optional)

## `CreateJudgeClassBody`

- `scope: kindgi.client.JudgeClassScopeTenant | kindgi.client.JudgeClassScopeProject | kindgi.client.JudgeClassScopeAgent | kindgi.client.JudgeClassScopeUnrecognized`
- `name: str`
- `weight: float`
- `description: str | None` (optional)
- `assertable_by: kindgi.client.JudgeClassAssertableBy | None` (`assertableBy` on the wire) (optional)

## `CreateJudgmentBody`

- `run_id: str` (`runId` on the wire)
- `item: kindgi.client.JudgedItem`
- `verdict: Literal['yes', 'no']`
- `reason: str | None` (optional)
- `judge_class_id: str | None` (`judgeClassId` on the wire) (optional)
- `participant_id: str | None` (`participantId` on the wire) (optional)
- `correction: kindgi.client.Correction | None` (optional)

## `CreateMemoryErasureBody`

- `root: kindgi.client.MemoryErasureFactSelector | kindgi.client.MemoryErasureSubjectSelector | kindgi.client.MemoryErasureConversationSelector`

## `CreateProposalBody`

A hand-written proposal: new content for a data block that `fromVersion` pins, for a live scope. The same change from the same version for the same scope is one proposal (answered with `X-Proposal-Deduped: true`).

- `agent_id: str` (`agentId` on the wire)
- `from_version: str` (`fromVersion` on the wire)
- `scope: kindgi.client.LiveScopeTenant | kindgi.client.LiveScopeOrg | kindgi.client.LiveScopeProject | kindgi.client.LiveScopeSegment | kindgi.client.LiveScopeUnrecognized`
- `tier: Union[Literal['settings-block', 'prompt-block'], str]`
- `change: kindgi.client.Change`
- `hypothesis: str`
- `evidence: kindgi.client.Evidence1 | None` (optional)

## `CreateResourceResult`

Shared 201 response body for platform-hierarchy create endpoints — the freshly-assigned id of the created row.

- `id: str`

## `CreateServiceAccountBody`

- `name: str`
- `description: str | None` (optional)
- `grants: list[Annotated[kindgi.client.ServiceAccountGrantTenantAdmin | kindgi.client.ServiceAccountGrantTenantMember | kindgi.client.ServiceAccountGrantProjectBody, FieldInfo(annotation=NoneType, required=True, discriminator='kind')]] | None` (optional)

## `CreateSystemTenantBody`

- `name: str`
- `slug: str | None` (optional)
- `production_allowed: bool | None` (`productionAllowed` on the wire) (optional)
- `test: bool | None` (optional)
- `image_prefix: str | None` (`imagePrefix` on the wire) (optional)
- `first_admin: kindgi.client.FirstAdmin | None` (`firstAdmin` on the wire) (optional)

## `CreateSystemTenantResult`

- `tenant: kindgi.client.SystemTenant`
- `first_admin: kindgi.client.FirstAdmin1 | None` (`firstAdmin` on the wire) (optional)
- `admin_key: kindgi.client.AdminKey | None` (`adminKey` on the wire) (optional)

## `CreateUserBody`

- `display_name: str` (`displayName` on the wire)
- `primary_email: str | None` (`primaryEmail` on the wire) (optional)
- `send_invite: bool | None` (`sendInvite` on the wire) (optional)

## `CreateWebhookEndpointBody`

- `url: AnyUrl`
- `events: list[Annotated[Union[Literal['run.finished', 'improvement-pass.finished', 'approval.requested'], str], <kindgi.client._open.OpenEnum object at 0x10b6b7e10>]]`
- `filter: kindgi.client.WebhookEndpointFilter | None` (optional)
- `secret_ref: kindgi.client.WebhookSecretRef` (`secretRef` on the wire)
- `description: str | None` (optional)
