Ping Session
Ping the session by attempting a simple chat completion. If the chat completion fails, the session is considered dead and will be closed.
Authorization
Authorization
<token>Provide the API key in either format: 'Bearer sk-xxxxxx.yyyyyyy' or just 'sk-xxxxxx.yyyyyyy'. The prefix is 9 characters long including 'sk-'.
In: header
Response Body
Successful Response
TypeScript Definitions
Use the response body type in TypeScript.
response
RequiredunknownHow is this guide?
Create Model Session POST
Create a session with a provider using a model ID and associate it with the API key. This endpoint creates a session and automatically associates it with the API key used for authentication. Each API key can have at most one active session at a time.
Approve Spending POST
Approve the contract to spend MOR tokens on your behalf. Connects to the proxy-router's /blockchain/approve endpoint. For creating sessions, approve enough tokens by calculating: bid_price * session_duration. Uses the DIAMOND_CONTRACT_ADDRESS environment variable as the spender contract address.