# Models: B

> API models starting with B.

## `Basis`

What the estimate is built from.

- `replays: int`
- `proof_replays: int | None` (`proofReplays` on the wire) (optional)
- `mean_run_cost_usd: str | None` (`meanRunCostUsd` on the wire) (optional)

## `Binding`

- `root: str`

## `BlobMeta`

- `blob_id: str` (`blobId` on the wire)
- `tenant_id: uuid.UUID` (`tenantId` on the wire)
- `name: str`
- `content_type: str` (`contentType` on the wire)
- `size: int`
- `hash: str`
- `tags: dict[str, str]`
- `owner_run_id: uuid.UUID | None` (`ownerRunId` on the wire) (optional)
- `project_id: str | None` (`projectId` on the wire) (optional)
- `created_by: str | None` (`createdBy` on the wire) (optional)
- `created_at: AwareDatetime` (`createdAt` on the wire)
- `bucket: str | None` (optional)
- `key: str | None` (optional)

## `Block`

A data block version: a prompt or settings, versioned like a tool (immutable versions, soft unregister). An agent version pins the block versions it uses when it is published. Belongs to one project and is authorized through it.

- `id: str`
- `version: str`
- `kind: Union[Literal['settings', 'prompt'], str]`
- `description: str | None` (optional)
- `content: kindgi.client.PromptBlockContent | kindgi.client.SettingsBlockContent`
- `project_id: uuid.UUID` (`projectId` on the wire)
- `published_at: AwareDatetime` (`publishedAt` on the wire)
- `unregistered_at: AwareDatetime | None` (`unregisteredAt` on the wire) (optional)
- `published_by: kindgi.client.PublishedBy | None` (`publishedBy` on the wire) (optional)
- `source: kindgi.client.BlockVersionSource | None` (optional)

## `BlockCollectionPage`

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

## `BlockRef`

A settings block an agent reads, by id and semver range.

- `id: str`
- `version: str`

## `BlockRunsIn`

One place a version of the block runs: a project, or a segment pin inside one, whose running version of an agent pins it.

- `project_id: str` (`projectId` on the wire)
- `agent_id: str` (`agentId` on the wire)
- `agent_version: str` (`agentVersion` on the wire)
- `block_version: str` (`blockVersion` on the wire)
- `follows: Union[Literal['pin', 'latest'], str]`
- `segment: list[kindgi.client.ScopeSegment] | None` (optional)
- `in_your_files: kindgi.client.InYourFiles | None` (`inYourFiles` on the wire) (optional)

## `BlockRunsInList`

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

## `BlockVersionSource`

Where a block version came from: `api` (`POST /v1/blocks`), `deploy` (a deploy's pack; `id` is the deployment's) or `suggested-change` (`id` is the suggested change's). Absent on a version published before it was recorded.

- `kind: Union[Literal['api', 'deploy', 'suggested-change'], str]`
- `id: str | None` (optional)

## `Budget`

- `max_cost_usd: float | None` (`maxCostUsd` on the wire) (optional)
- `max_latency_ms: int | None` (`maxLatencyMs` on the wire) (optional)

## `Budget2`

Default: $5 and 30 candidates.

- `max_cost_usd: float | None` (`maxCostUsd` on the wire) (optional)
- `max_candidates: int | None` (`maxCandidates` on the wire) (optional)

## `BuiltOn`

The agent version it's built on: what its project ran when it was made, or when it was last rebuilt (`rebuiltAt`).

- `version: str`
- `rebuilt_at: AwareDatetime | None` (`rebuiltAt` on the wire) (optional)

## `By`

The fix job, the rule at save, or the caller who re-sorted it: a user or a service, with its id.

- `kind: Literal['fix-job', 'rule']`

## `By1`

The fix job, the rule at save, or the caller who re-sorted it: a user or a service, with its id.

- `kind: Literal['user', 'service']`
- `id: str`

## `By2`

Who pinned it, or who added it as Latest; a person with their name when the directory has one.

- `kind: Literal['user', 'service']`
- `id: str`
- `name: str | None` (optional)
