Skip to main content

Integration Overview

Bulutistan LLMaaS provides an OpenAI-compatible API, which means you can use standard OpenAI client libraries to interact with the platform. No custom SDK is required.

Why OpenAI Compatibility?

We designed Bulutistan LLMaaS to be a drop-in replacement for OpenAI's API:

  • Zero learning curve - Use familiar OpenAI SDK methods
  • Existing code works - Just change the base URL
  • Community support - Leverage existing OpenAI tutorials and resources
  • Multiple languages - Any OpenAI SDK works (Python, Node.js, Go, etc.)

Quick Setup

The only difference from using OpenAI directly is setting a custom base_url:

from openai import OpenAI

client = OpenAI(
api_key="sk-proj-your-api-key",
base_url="https://api.bulutistan.ai/v1" # Point to Bulutistan LLMaaS
)

# Use exactly like OpenAI
response = client.chat.completions.create(
model="meta-llama/Llama-3.1-8B-Instruct",
messages=[{"role": "user", "content": "Hello!"}]
)

Supported Endpoints

Bulutistan LLMaaS supports the following OpenAI-compatible endpoints:

EndpointDescription
/v1/chat/completionsChat completions with streaming support
/v1/completionsText completions (legacy)
/v1/embeddingsText embeddings
/v1/images/generationsImage generation
/v1/modelsList available models

Integration Guides

Choose your preferred language:

GuideDescription
Python (OpenAI SDK)Official OpenAI Python library
Node.js (OpenAI SDK)Official OpenAI JavaScript library
cURL / HTTPDirect HTTP requests for any language

Environment Variables

For convenience, set these environment variables:

export OPENAI_API_KEY="sk-proj-your-api-key"
export OPENAI_BASE_URL="https://api.bulutistan.ai/v1"

Then any OpenAI SDK will automatically use Bulutistan LLMaaS:

from openai import OpenAI
client = OpenAI() # Reads from environment

Migration from OpenAI

If you're migrating from OpenAI, the only change required is adding the base_url parameter:

  from openai import OpenAI

client = OpenAI(
api_key="your-key",
+ base_url="https://api.bulutistan.ai/v1"
)

That's it - all your existing OpenAI SDK code will work with Bulutistan LLMaaS.