API Documentation

Integrate Oblivion's AI capabilities into your applications

Quick Start

Get API Key

Sign up and get your API key from the dashboard

Make Request

Send a POST request to our chat endpoint

Get Response

Receive AI-generated responses in real-time

Basic Example

JavaScript
const response = await fetch('https://oblivion.ai/api/chat', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    messages: [
      { role: 'user', content: 'Hello, Oblivion!' }
    ]
  })
});

const data = await response.json();
console.log(data.message);

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header of your requests.

Authorization Header
Authorization: Bearer YOUR_API_KEY
Getting Your API Key

API keys are currently in private beta. Contact our support team to request access.

API Endpoints

POST

/api/chat

Send a message to Oblivion and receive an AI-generated response.

Request Body

JSON
{
  "messages": [
    {
      "role": "user",
      "content": "What is artificial intelligence?"
    }
  ],
  "stream": false,
  "max_tokens": 1000,
  "temperature": 0.7
}

Parameters

ParameterTypeRequiredDescription
messagesarrayYesArray of message objects
streambooleanNoEnable streaming responses
max_tokensintegerNoMaximum tokens in response
temperaturefloatNoResponse creativity (0.0-1.0)

Response

JSON
{
  "id": "msg_abc123",
  "object": "chat.completion",
  "created": 1701234567,
  "model": "oblivion-1",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Artificial intelligence (AI) refers to..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 15,
    "completion_tokens": 150,
    "total_tokens": 165
  }
}

Rate Limits

To ensure fair usage and maintain service quality, we implement rate limits on API requests.

Free Tier

  • • 100 requests per hour
  • • 1,000 requests per day
  • • 10,000 tokens per request

Pro Tier

  • • 1,000 requests per hour
  • • 10,000 requests per day
  • • 50,000 tokens per request

Rate limit headers are included in all responses to help you track your usage.

SDKs and Libraries

JavaScript/TypeScript

Available

Official SDK for Node.js and browser environments

npm install @oblivion/sdk

Python

Coming Soon

Python SDK with async support

pip install oblivion-sdk

Go

Coming Soon

Lightweight Go client library

go get github.com/oblivion/go-sdk

cURL

Available

Direct HTTP requests using cURL

curl -X POST https://oblivion.ai/api/chat

Need Help?

Our team is here to help you integrate Oblivion into your applications successfully.

Built with v0