Back to home

Chat Oriper API

A powerful, OpenAI-compatible API for accessing state-of-the-art AI models. Get started in minutes with our simple REST API.

Quick Start

1. Get your API Key

Sign up for a free account and generate your API key from the dashboard.

2. Make your first request

Use your favorite HTTP client or SDK to make requests to our API.

Base URL

https://api.oriper.com/v1

Authentication

Include your API key in the Authorization header of all requests:

Authorization: Bearer sk-oriper-your-api-key

Endpoints

POST/v1/chat/completions

Create a chat completion with the AI model

Request Body

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

Response

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1677858242,
  "model": "gpt-4",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! I'm doing great, thank you!"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 23,
    "completion_tokens": 18,
    "total_tokens": 41
  }
}

cURL Example

curl https://api.oriper.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-oriper-your-api-key" \
  -d '{
    "model": "gpt-4",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

SDK Examples

PythonUsing OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://api.oriper.com/v1",
    api_key="sk-oriper-your-api-key"
)

response = client.chat.completions.create(
    model="gpt-4",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

Node.jsUsing OpenAI SDK

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.oriper.com/v1',
  apiKey: 'sk-oriper-your-api-key'
});

const response = await client.chat.completions.create({
  model: 'gpt-4',
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'Hello!' }
  ]
});

console.log(response.choices[0].message.content);

JavaScriptUsing Fetch API

const response = await fetch('https://api.oriper.com/v1/chat/completions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer sk-oriper-your-api-key'
  },
  body: JSON.stringify({
    model: 'gpt-4',
    messages: [
      { role: 'user', content: 'Hello!' }
    ]
  })
});

const data = await response.json();
console.log(data.choices[0].message.content);

Available Models

GPT-4

gpt-4

Most capable model for complex reasoning

GPT-4 Turbo

gpt-4-turbo

Faster GPT-4 with updated knowledge

GPT-3.5 Turbo

gpt-3.5-turbo

Fast and efficient for most tasks

Claude 3 Opus

claude-3-opus

Advanced analysis and reasoning

Claude 3 Sonnet

claude-3-sonnet

Balanced performance

Rate Limits

Free Tier

  • 2,000,000 tokens per month
  • 60 requests per minute
  • 10 API keys maximum

Token Counting

Both input and output tokens count towards your monthly limit. Track your usage in the dashboard.

Error Codes

CodeDescription
400Bad request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Account suspended or banned
429Rate limit exceeded or token limit reached
500Internal server error

Ready to get started?

Create your free account and start building with AI today.