Skip to main content
POST
/
v1
/
models
/
attest
Attest Model
curl --request POST \
  --url https://api.truthlocks.com/v1/models/attest \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "fraud-detection-v2",
  "hash": "a1b2c3d4e5f6789012345678abcdef0123456789abcdef0123456789abcdef01",
  "framework": "pytorch",
  "version": "2.1.0",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "training_dataset_ids": [
    "660e8400-e29b-41d4-a716-446655440000"
  ]
}
'
{
  "model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "hash": "<string>",
  "framework": "<string>",
  "version": "<string>",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "training_dataset_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "created_at": "2023-11-07T05:31:56Z"
}
Creates a cryptographically anchored attestation for an AI model. The attestation captures the model’s framework, training lineage, hyperparameters, and evaluation metrics. It is linked to the originating agent and anchored in the transparency log. Model attestations provide an auditable record of what was trained, how it was trained, and what data was used — enabling compliance teams and downstream consumers to verify model provenance before deployment.

Authentication

X-API-Key
string
required
API key with models:write scope. Alternatively, pass a Bearer JWT token in the Authorization header.
X-Tenant-ID
string
required
Tenant identifier for multi-tenant isolation.

Request

agent_id
string
required
MAIP agent identifier that trained or owns this model.
name
string
required
Human-readable model name. Must be unique within the agent’s namespace per version.
version
string
Semantic version of the model (e.g. 2.1.0). Defaults to 1.0.0 if omitted.
framework
string
ML framework used to train the model. Accepted values: pytorch, tensorflow, onnx, custom.
hash
string
SHA-256 hex digest of the serialized model weights. Used for integrity verification at deployment time.
training_dataset_ids
string[]
Array of dataset attestation identifiers (maip-ds:ULID) used to train this model. Creates lineage edges automatically.
hyperparameters
object
Key-value map of hyperparameters used during training (e.g. learning_rate, batch_size, epochs).
metrics
object
Key-value map of evaluation metrics (e.g. accuracy, f1_score, auc_roc).

Response

id
string
Unique model attestation identifier in MAIP format (maip-model:ULID).
agent_id
string
The agent that attested this model.
name
string
Model name as provided in the request.
version
string
Resolved version of the model.
framework
string
ML framework identifier.
hash
string
SHA-256 hex digest stored for integrity verification.
training_dataset_ids
string[]
Linked training dataset attestation identifiers.
status
string
Attestation status. Always attested on creation.
receipt_id
string
Transparency-log receipt anchoring this attestation.
created_at
string
ISO 8601 timestamp of creation.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

application/json
name
string
required

Model name

hash
string
required

SHA-256 hash of the model weights

framework
string
required

ML framework (e.g. pytorch, tensorflow, onnx)

version
string
required

Model version string

agent_id
string<uuid>
required

Attesting agent

training_dataset_ids
string<uuid>[]

IDs of attested training datasets

Response

Model attested

model_id
string<uuid>
receipt_id
string<uuid>
name
string
hash
string
framework
string
version
string
agent_id
string<uuid>
training_dataset_ids
string<uuid>[]
created_at
string<date-time>