Skip to main content

Using Official OpenAI Libraries

GravitexAI is fully compatible with OpenAI API format. You can use official OpenAI SDKs with just a simple configuration change.

Supported SDKs

  • Python (openai)
  • Node.js (openai)
  • .NET (OpenAI)
  • Go (go-openai)
  • Java (third-party)
  • PHP (third-party)
  • Ruby (third-party)

Python SDK

Installation

Basic Configuration

Environment Variables

Async Usage

Streaming

Node.js SDK

Installation

Basic Configuration

Streaming

TypeScript

.NET SDK

Installation

Basic Configuration

Go SDK

Installation

Basic Configuration

Model Switching

Advanced Features

Function Calling

Image Input

Embeddings

Error Handling

Migration Guide

From OpenAI

No code changes needed. All other code stays the same including method calls, parameter formats, and response handling.