OpenAdapterOpenAdapter
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:

LanguagePackageInstall
Pythonopenaipip install openai
JavaScriptopenainpm install openai
Gosashabaranov/go-openaigo get github.com/sashabaranov/go-openai
PHPopenai-php/clientcomposer require openai-php/client
Rustasync-openaicargo add async-openai
Rubyruby-openaigem install ruby-openai
C# / .NETOpenAIdotnet add package OpenAI
Javaopenai-javaSee 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

On this page