API Reference
Complete reference for the ML Bridge API endpoints.
Base URL:
https://api.mlbridge.net/v1
Authentication Required
All API requests require authentication using a Bearer token obtained through wallet signature verification.
Bash
# First, get a challenge
curl -X POST https://api.mlbridge.net/v1/api/auth/challenge \
-H "Content-Type: application/json" \
-d '{"address": "0x742d35Cc6634C0532925a3b8D4C9db96"}'
# Then verify with signature
curl -X POST https://api.mlbridge.net/v1/api/auth/verify \
-H "Content-Type: application/json" \
-d '{
"address": "0x742d35Cc6634C0532925a3b8D4C9db96",
"signature": "0x1234567890abcdef...",
"nonce": "1234567890"
}'
# Use the token in subsequent requests
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
https://api.mlbridge.net/v1/api/models
POST
/api/auth/challenge
Request Authentication Challenge
Generate a challenge message for wallet-based authentication
POST
/api/auth/verify
Verify Authentication Signature
Verify the signed challenge and receive an access token
GET
/api/models
List Available Models
Retrieve a list of all registered AI models in the network
POST
/api/models/register
Register New Model
Register a new AI model in the ML Bridge network
POST
/api/tasks/submit
Submit ML Task
Submit a new machine learning task for execution
GET
/api/tasks/{taskId}/status
Get Task Status
Retrieve the current status and results of a submitted task
POST
/api/compute/register
Register Compute Node
Register a compute node to participate in the ML Bridge network
GET
/api/verification/{taskId}
Get Verification Results
Retrieve verification results and consensus data for a completed task