AI Access API
Understand the single authenticated route used to proxy AI requests through rNet.
Core Concept
Applications make AI requests by sending prompt and completion payloads to the rNet AI proxy. Each successful request deducts credits from the user's centralized rNet account balance.
Supported AI Models
The following models are currently available on rNet:
text-embedding-3-small(OpenAI)gemini-2.5-flash-lite(Google)
For a live list of models and their specific capabilities, visit the Supported Models page.
POST /ai
Submit a non-streaming model request. The SDK wraps this endpoint with RNetAi.chat(body, accessToken, model).
| Parameter | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | User access token received from the token flow |
| model | string | Yes | Selected rNet model/provider route |
| body | object | Yes | Request body shaped for the selected AI provider |
Provider-Specific Bodies
rNet does not rewrite your request body into another provider's format. If you select OpenAI, send an OpenAI-compatible body. If you select Gemini, send a Gemini-compatible body. Pass provider-specific fields such as
stream, tools, or generationConfig when that provider requires them.OpenAI Embedding Body
Gemini-Style Body
POST /ai/stream (Not Tested)
Submit a streaming model request. The SDK wraps this endpoint with RNetAi.chatStream(body, accessToken, model).