Complete API documentation for Confidential AI Network integration and development
All API requests require authentication using OAuth 2.0 with JWT tokens.
/auth/token
Exchange credentials for access token
{
"grant_type": "password",
"username": "your_username",
"password": "your_password",
"client_id": "your_client_id"
}
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "def50200..."
}
Manage AI training contracts and agreements between parties.
/contracts
Retrieve list of contracts
?status=active&type=ai_training&limit=20&offset=0
/contracts
Create new contract
{
"title": "Healthcare AI Training Contract",
"description": "Training AI model on patient data",
"parties": ["tdp_id", "tdc_id", "ccrp_id"],
"datasets": ["dataset_id_1", "dataset_id_2"],
"terms": {
"duration_days": 365,
"data_usage": "training_only",
"privacy_level": "confidential"
}
}
Manage training datasets and their metadata.
/datasets
Retrieve available datasets
/datasets
Register new dataset
{
"name": "Patient Health Records",
"description": "Anonymized healthcare data",
"data_type": "structured",
"record_count": 1000000,
"privacy_level": "confidential",
"compliance": ["HIPAA", "GDPR"],
"metadata": {
"fields": ["age", "gender", "diagnosis"],
"format": "CSV",
"size_mb": 250
}
}
Manage AI model training sessions and monitor progress.
/training/sessions
Start new training session
{
"contract_id": "contract_123",
"model_type": "neural_network",
"hyperparameters": {
"learning_rate": 0.001,
"epochs": 100,
"batch_size": 32
},
"privacy_settings": {
"differential_privacy": true,
"epsilon": 1.0,
"delta": 1e-5
}
}
Common HTTP error codes and their meanings.
| Code | Error | Description |
|---|---|---|
400 |
Bad Request | Invalid request parameters or body |
401 |
Unauthorized | Invalid or expired authentication token |
403 |
Forbidden | Insufficient permissions for the resource |
404 |
Not Found | Requested resource does not exist |
429 |
Too Many Requests | Rate limit exceeded |
500 |
Internal Server Error | Unexpected server error |