HTTP Client
Complete guide for integrating with NCN Network using HTTP REST API.
Overview
The HTTP API provides:
Simple REST interface
JSON request/response format
Easy integration with any language
Web browser compatibility
Base URL
Environment
URL
Local
http://localhost:8080
Testnet
https://api.testnet.ncn-network.io
Mainnet
https://api.ncn-network.io
Endpoints
Health Check
Response:
Submit Inference
Response:
Get Task Status
Response:
List Models
Response:
Client Examples
cURL
Python (requests)
JavaScript (fetch)
Go
Error Handling
HTTP Status Codes
Code
Meaning
Action
200
Success
Process response
400
Bad Request
Check input format
404
Not Found
Check request_id
429
Rate Limited
Retry with backoff
500
Server Error
Retry or report
503
Unavailable
Retry later
Error Response Format
Retry Logic
Authentication (Future)
When API keys are implemented:
Rate Limiting
Limits
Endpoint
Limit
POST /api/v1/inference
100/min
GET /api/v1/inference/*
1000/min
GET /health
No limit
Rate Limit Headers
Handle Rate Limits
Next Steps
gRPC Client - Higher performance option
Payment Integration - Handle payments
Examples - More code examples
Last updated
