JSON formats
The JSON that every language, the gateway and the database share is
published as one JSON Schema (draft 2020-12):
/schemas/criogenai.schema.json. Each
type is under $defs, referenced as criogenai.schema.json#/$defs/<Type>.
The test suite validates values written by the engine against it.
| Type | What it is |
|---|---|
Message, ContentBlock, MediaSource | One message of a conversation and its parts |
ToolSpec, ToolAnnotations | A tool the model may call |
ModelRequest, Settings, OutputSpec, ToolChoice, Reasoning | What a model is asked |
ModelResponse, Usage, FinishReason, Warning | What it answers |
MessageDelta, BlockDelta | A piece of a streamed message |
ModelError | A classified provider failure |
ApprovalRequest, Decision | A call waiting for a person, and the answer |
AuditRecord | One audit trail record (no content) |
UsageRecord | The gateway's record of one request (no content) |
ErrorObject | An error as the SDKs report it |
The error codes are a separate file,
/schemas/error-codes.json, shown on
Error codes.
Readers of these formats should accept fields they do not know: new optional fields may be added in minor versions.