Projects
Manage and monitor your AI projects with the Cortif.AI API
Projects
Projects are the core organizational unit in Cortif.AI. Each project represents an AI system or model that you want to monitor continuously.
Project Object
interface Project {
id: string;
name: string;
description?: string;
organizationId: string;
status: 'active' | 'inactive' | 'archived';
createdAt: string;
updatedAt: string;
metadata?: {
category?: string;
domain?: string;
modelType?: string;
framework?: string;
version?: string;
};
}List Projects
Retrieve all projects for your organization with optional filtering and pagination.
GET /api/projects?page=1&limit=10&status=active&category=nlp
Cookie: session-token=your_session_tokenQuery Parameters:
page(optional): Page number (default: 1)limit(optional): Items per page (default: 10, max: 100)status(optional): Filter by status (active,inactive,archived)category(optional): Filter by categorydomain(optional): Filter by domain
{
"success": true,
"data": [
{
"id": "proj_123",
"name": "Customer Support Chatbot",
"description": "AI chatbot for customer support automation",
"organizationId": "org_456",
"status": "active",
"createdAt": "2024-01-10T10:00:00Z",
"updatedAt": "2024-01-15T14:30:00Z",
"metadata": {
"category": "nlp",
"domain": "customer-service",
"modelType": "transformer",
"framework": "huggingface",
"version": "1.2.0"
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 25,
"totalPages": 3
}
}curl -X GET "https://api.cortif.ai/api/projects?page=1&limit=10&status=active" \
-H "Cookie: session-token=your_session_token"Create Project
Create a new monitoring project.
POST /api/projects
Content-Type: application/json
Cookie: session-token=your_session_token
{
"name": "Fraud Detection Model",
"description": "ML model for detecting fraudulent transactions",
"status": "active",
"metadata": {
"category": "ml",
"domain": "fintech",
"modelType": "ensemble",
"framework": "scikit-learn",
"version": "2.1.0"
}
}Required Fields:
name: Project name (string, 1-100 characters)
Optional Fields:
description: Project description (string, max 500 characters)status: Project status (default: "active")metadata: Additional project metadata
{
"success": true,
"data": {
"id": "proj_789",
"name": "Fraud Detection Model",
"description": "ML model for detecting fraudulent transactions",
"organizationId": "org_456",
"status": "active",
"createdAt": "2024-01-15T16:00:00Z",
"updatedAt": "2024-01-15T16:00:00Z",
"metadata": {
"category": "ml",
"domain": "fintech",
"modelType": "ensemble",
"framework": "scikit-learn",
"version": "2.1.0"
}
}
}curl -X POST https://api.cortif.ai/api/projects \
-H "Content-Type: application/json" \
-H "Cookie: session-token=your_session_token" \
-d '{
"name": "Fraud Detection Model",
"description": "ML model for detecting fraudulent transactions",
"metadata": {
"category": "ml",
"domain": "fintech",
"modelType": "ensemble"
}
}'Get Project
Retrieve a specific project by ID.
GET /api/projects/proj_123
Cookie: session-token=your_session_token{
"success": true,
"data": {
"id": "proj_123",
"name": "Customer Support Chatbot",
"description": "AI chatbot for customer support automation",
"organizationId": "org_456",
"status": "active",
"createdAt": "2024-01-10T10:00:00Z",
"updatedAt": "2024-01-15T14:30:00Z",
"metadata": {
"category": "nlp",
"domain": "customer-service",
"modelType": "transformer",
"framework": "huggingface",
"version": "1.2.0"
},
"stats": {
"totalRuns": 156,
"activeAlerts": 3,
"lastRunAt": "2024-01-15T14:25:00Z",
"successRate": 98.7
}
}
}curl -X GET https://api.cortif.ai/api/projects/proj_123 \
-H "Cookie: session-token=your_session_token"Update Project
Update an existing project.
PUT /api/projects/proj_123
Content-Type: application/json
Cookie: session-token=your_session_token
{
"name": "Enhanced Customer Support Chatbot",
"description": "AI chatbot with improved NLP capabilities",
"status": "active",
"metadata": {
"category": "nlp",
"domain": "customer-service",
"modelType": "transformer",
"framework": "huggingface",
"version": "1.3.0"
}
}{
"success": true,
"data": {
"id": "proj_123",
"name": "Enhanced Customer Support Chatbot",
"description": "AI chatbot with improved NLP capabilities",
"organizationId": "org_456",
"status": "active",
"createdAt": "2024-01-10T10:00:00Z",
"updatedAt": "2024-01-15T16:30:00Z",
"metadata": {
"category": "nlp",
"domain": "customer-service",
"modelType": "transformer",
"framework": "huggingface",
"version": "1.3.0"
}
}
}curl -X PUT https://api.cortif.ai/api/projects/proj_123 \
-H "Content-Type: application/json" \
-H "Cookie: session-token=your_session_token" \
-d '{
"name": "Enhanced Customer Support Chatbot",
"description": "AI chatbot with improved NLP capabilities",
"metadata": {
"version": "1.3.0"
}
}'Delete Project
Delete a project and all associated data.
Warning: This action is irreversible. All monitoring data, runs, alerts, and evidence packs associated with this project will be permanently deleted.
DELETE /api/projects/proj_123
Cookie: session-token=your_session_token{
"success": true,
"message": "Project deleted successfully"
}curl -X DELETE https://api.cortif.ai/api/projects/proj_123 \
-H "Cookie: session-token=your_session_token"Project Runs
Get monitoring runs for a specific project.
GET /api/projects/proj_123/runs?page=1&limit=10&status=completed
Cookie: session-token=your_session_tokenQuery Parameters:
page(optional): Page number (default: 1)limit(optional): Items per page (default: 10)status(optional): Filter by run status
{
"success": true,
"data": [
{
"id": "run_456",
"projectId": "proj_123",
"name": "Daily Model Check",
"status": "completed",
"startTime": "2024-01-15T14:00:00Z",
"endTime": "2024-01-15T14:25:00Z",
"metadata": {
"accuracy": 0.987,
"latency": 45,
"throughput": 1200
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 156,
"totalPages": 16
}
}curl -X GET "https://api.cortif.ai/api/projects/proj_123/runs?status=completed" \
-H "Cookie: session-token=your_session_token"Error Handling
Common error responses for project operations:
| Status Code | Error | Description |
|---|---|---|
400 | INVALID_INPUT | Invalid request data |
401 | UNAUTHORIZED | Authentication required |
403 | FORBIDDEN | Insufficient permissions |
404 | PROJECT_NOT_FOUND | Project doesn't exist |
409 | PROJECT_EXISTS | Project name already exists |
422 | VALIDATION_ERROR | Input validation failed |
Example Error Response
{
"success": false,
"error": "Project not found",
"code": "PROJECT_NOT_FOUND"
}SDK Examples
JavaScript/TypeScript
import { CortifClient } from '@cortif/sdk';
const client = new CortifClient();
// List projects
const projects = await client.projects.list({
page: 1,
limit: 10,
status: 'active'
});
// Create project
const newProject = await client.projects.create({
name: 'My AI Model',
description: 'Production ML model for recommendations',
metadata: {
category: 'ml',
framework: 'tensorflow'
}
});
// Get project
const project = await client.projects.get('proj_123');
// Update project
const updatedProject = await client.projects.update('proj_123', {
description: 'Updated description',
metadata: { version: '2.0.0' }
});
// Delete project
await client.projects.delete('proj_123');Python
from cortif import CortifClient
client = CortifClient()
# List projects
projects = client.projects.list(page=1, limit=10, status='active')
# Create project
new_project = client.projects.create({
'name': 'My AI Model',
'description': 'Production ML model for recommendations',
'metadata': {
'category': 'ml',
'framework': 'tensorflow'
}
})
# Get project
project = client.projects.get('proj_123')
# Update project
updated_project = client.projects.update('proj_123', {
'description': 'Updated description',
'metadata': {'version': '2.0.0'}
})
# Delete project
client.projects.delete('proj_123')Best Practices
Project Management Tips
- Naming Convention: Use descriptive names that include model type and version
- Metadata: Always include relevant metadata for better organization
- Status Management: Use status fields to organize active vs archived projects
- Regular Cleanup: Archive or delete unused projects to maintain organization
- Documentation: Keep descriptions up-to-date with model changes
Next Steps
- Set up monitoring runs for your projects
- Configure alerts for anomaly detection
- Collect evidence for compliance
- Manage team access to projects