Infere API

Welcome to the Infere API. This service provides access to AI models with unified interfaces.

Available Endpoints:

Important: Admin Endpoint Changes

Admin endpoints have been moved to the dedicated admin worker (admin.infere.com).

For backward compatibility, admin endpoints are temporarily available here but will be removed in a future update.

OpenAI-Compatible Endpoint Example:

POST /v1/chat/completions
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
  "model": "gpt-3.5-turbo",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello, how are you?"}
  ],
  "temperature": 0.7,
  "max_tokens": 150
}
          

Token Validation Example:

POST /validate-token
Content-Type: application/json

{
  "token": "sk-...(your token)...",
  "estimatedCost": 1.0
}