API ReferenceBuild with ML Bridge
Comprehensive API documentation for integrating decentralized machine learning capabilities into your applications with blockchain-verified computation.
Quick Start Guide
Get up and running with the ML Bridge API in minutes. Follow these simple steps to make your first API call.
Authentication
Connect your wallet and get API credentials
// Connect wallet and get challenge
const challenge = await fetch('/api/auth/challenge', {
method: 'POST',
body: JSON.stringify({ address: walletAddress })
});
Make API Call
Use your token to access ML Bridge endpoints
// Make authenticated request
const models = await fetch('/api/models', {
headers: { 'Authorization': 'Bearer ' + token }
});
Submit Task
Create and monitor ML tasks
// Submit ML task
const task = await fetch('/api/tasks/submit', {
method: 'POST',
body: JSON.stringify({ modelId, input, priority })
});
API Base URL
https://api.mlbridge.net/v1
All API requests should be made to this base URL with the appropriate endpoint path.
API Endpoints
Explore our comprehensive API endpoints for models, tasks, and network operations.
API Overview
Introduction to the ML Bridge API, authentication, and core concepts.
Models API
Register, manage, and query AI models on the ML Bridge network.
Tasks API
Create, submit, and monitor machine learning tasks and their execution.
Official SDKs
Use our official SDKs to integrate ML Bridge into your applications more easily.
JavaScript/TypeScript
npm install @mlbridge/sdk
Python
pip install mlbridge-python
Go
go get github.com/mlbridge/go-sdk