{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "marqdo://contracts/ModelCallUsageV1", "title": "ModelCallUsageV1", "type": "object", "required": [ "schema_version", "call_id", "attempt_id", "run_id", "status", "usage_state", "measurement_source" ], "properties": { "schema": { "const": "ModelCallUsageV1" }, "schema_version": { "const": 1 }, "call_id": { "type": "string", "minLength": 1 }, "attempt_id": { "type": "string", "minLength": 1 }, "run_id": { "type": "string", "minLength": 1 }, "status": { "enum": ["started", "succeeded", "failed", "cancelled", "interrupted"] }, "usage_state": { "enum": ["pending", "partial", "final", "unknown"] }, "measurement_source": { "enum": ["provider", "estimated", "none"] }, "input_tokens": { "type": ["integer", "null"], "minimum": 0 }, "output_tokens": { "type": ["integer", "null"], "minimum": 0 }, "total_tokens": { "type": ["integer", "null"], "minimum": 0 }, "revision": { "type": "integer", "minimum": 1 } }, "additionalProperties": true }