Router API Reference
WIP - THIS IS EARLY DRAFT
This document outlines the available RESTful API endpoints provided by a Cortensor Router Node. These endpoints enable interaction with sessions, tasks, and miners, making it easier to integrate AI inference functionality with traditional Web2 applications.
Authentication
All endpoints require API key authentication using a Bearer token in the Authorization
header.
Header Format:
Default Dev Token:
default-dev-token
Endpoints
GET /api/v1/info
/api/v1/info
Returns basic router node metadata.
Example:
GET /api/v1/status
/api/v1/status
Returns current router node status and health.
Example:
GET /api/v1/miners
/api/v1/miners
Lists all connected miners.
Example:
GET /api/v1/sessions
/api/v1/sessions
Lists all currently active sessions.
Example:
GET /api/v1/sessions/{sessionId}
/api/v1/sessions/{sessionId}
Retrieves details about a specific session.
Path Parameter:
sessionId
: Numeric ID of the session
Example:
GET /api/v1/tasks/{sessionId}/{taskId}
/api/v1/tasks/{sessionId}/{taskId}
Returns details of a specific task within a session.
Path Parameters:
sessionId
: Numeric ID of the sessiontaskId
: Numeric ID of the task
Example:
GET /api/v1/tasks/{sessionId}
/api/v1/tasks/{sessionId}
Lists all tasks submitted under a specific session.
Path Parameter:
sessionId
: Numeric ID of the session
Example:
POST /api/v1/completions/{sessionId}
/api/v1/completions/{sessionId}
Submits a prompt for AI inference using a specified session ID in the URL.
Path Parameter:
sessionId
: Numeric ID of the session
Request Body:
Example:
POST /api/v1/completions
/api/v1/completions
Submits a prompt with the session ID in the JSON payload instead of the URL.
Request Body:
Example:
Notes
The
stream
field enables real-time token-level streaming of AI completions.All endpoints are compatible with OpenAI-style interfaces, making integration intuitive for developers.
Use this API to serve private inference traffic through your self-hosted Router Node
Last updated