Quickstart
Make your first API call in under 5 minutes.
Prerequisites
- Python 3.8+ or Node.js 18+ installed
- A GabForge account — sign up free
1
Create an API key
Sign in to your dashboard, click API Keys in the left sidebar, and press Create new key. Give it a descriptive name, then copy the key immediately — it is displayed only once.
2
Install the SDK
Install the OpenAI Python package. The GabForge API is fully compatible with it.
pip install openai
3
Set your API key as an environment variable
Never hard-code secrets in source files. Store the key in your environment.
# Linux / macOS export GABFORGE_API_KEY="your-key-here" # Windows PowerShell $env:GABFORGE_API_KEY = "your-key-here"
4
Make your first request
Create a file called hello.py and run it.
import os from openai import OpenAI client = OpenAI( base_url="https://ai.gabforge.ai/v1", api_key=os.environ["GABFORGE_API_KEY"], ) response = client.chat.completions.create( model="gabforge-coder", messages=[{"role": "user", "content": "Hello!"}], ) print(response.choices[0].message.content)