Getting Started
Libraries & SDKs
OpenAdapter works with any OpenAI-compatible library — just change the base URL and API key.
OpenAdapter works with any OpenAI-compatible library. Just change the base URL and API key. Here are the most popular ones:
| Language | Package | Install |
|---|---|---|
| Python | openai | pip install openai |
| JavaScript | openai | npm install openai |
| Go | sashabaranov/go-openai | go get github.com/sashabaranov/go-openai |
| PHP | openai-php/client | composer require openai-php/client |
| Rust | async-openai | cargo add async-openai |
| Ruby | ruby-openai | gem install ruby-openai |
| C# / .NET | OpenAI | dotnet add package OpenAI |
| Java | openai-java | See Maven Central |
Configuration examples
Python
from openai import OpenAI
client = OpenAI(
api_key="sk-cv-...",
base_url="https://api.openadapter.in/v1",
)JavaScript
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'sk-cv-...',
baseURL: 'https://api.openadapter.in/v1',
});Go
package main
import (
openai "github.com/sashabaranov/go-openai"
)
config := openai.DefaultConfig("sk-cv-...")
config.BaseURL = "https://api.openadapter.in/v1"
client := openai.NewClientWithConfig(config)PHP
use OpenAI;
$client = OpenAI::factory()
->withApiKey('sk-cv-...')
->withBaseUri('https://api.openadapter.in/v1')
->make();Rust
use async_openai::{Client, config::OpenAIConfig};
let config = OpenAIConfig::new()
.with_api_key("sk-cv-...")
.with_api_base("https://api.openadapter.in/v1");
let client = Client::with_config(config);Ruby
require "openai"
client = OpenAI::Client.new(
access_token: "sk-cv-...",
uri_base: "https://api.openadapter.in/v1",
)curl
# Set these headers on every request:
# Authorization: Bearer sk-cv-...
# Content-Type: application/json
#
# Base URL: https://api.openadapter.in/v1