API ReferenceBuild with ML Bridge

Comprehensive API documentation for integrating decentralized machine learning capabilities into your applications with blockchain-verified computation.

RESTful API
Wallet Authentication
Real-time Updates

Quick Start Guide

Get up and running with the ML Bridge API in minutes. Follow these simple steps to make your first API call.

1

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 })
});
2

Make API Call

Use your token to access ML Bridge endpoints

// Make authenticated request
const models = await fetch('/api/models', {
  headers: { 'Authorization': 'Bearer ' + token }
});
3

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.

Official SDKs

Use our official SDKs to integrate ML Bridge into your applications more easily.

JS

JavaScript/TypeScript

npm install @mlbridge/sdk
Py

Python

pip install mlbridge-python
Go

Go

go get github.com/mlbridge/go-sdk

Rate Limits

Free Tier
Basic usage limits
1,000/hour
10,000/day
Pro Tier
Enhanced limits
10,000/hour
100,000/day

Best Practices

Use HTTPS
Always use secure connections
Handle Errors
Implement proper error handling
Cache Responses
Cache when appropriate to reduce calls
Monitor Usage
Track your API usage and limits