Skip to main content

Overview

ModelStack is fully compatible with the OpenAI SDK. Just change base_url and api_key — everything else works the same, including streaming, function calling, and all chat completion parameters.

Python

Installation

Setup

Chat Completion

Streaming

List Models

Using Different Models

Environment Variable

Instead of hardcoding your API key, use an environment variable:

Node.js / TypeScript

Installation

Setup

Chat Completion

Streaming

Environment Variables