Get started
Create an account, get an API key, install an OpenAI-compatible SDK, and make your first call to the GreenPT API.
GreenPT exposes an OpenAI-compatible API at https://api.greenpt.ai/v1, so
there is no GreenPT-specific SDK to install. Follow the steps below to go
from signup to your first response in a few minutes.
Prerequisites
A GreenPT account with any subscription — API-only, Starter, Pro, Teams, or Enterprise — and an API key. All plans include API access.
1. Create an account
Sign up for GreenPT and pick any subscription — API-only, Starter, Pro, Teams, or Enterprise — to unlock API access.
Sign up at account.greenpt.ai →
2. Get an API key
Once your subscription is active, generate an API key from the dashboard.
Keep your key secret
Keep your API key secure and never share it publicly or commit it to source control.
3. Install an OpenAI-compatible client
Use the official OpenAI client for your language and override the base URL.
npm install openaipip install openai4. Configure the client
Point the SDK at https://api.greenpt.ai/v1 and pass your API key. Store
the key in an environment variable rather than hard-coding it.
export GREENPT_API_KEY=sk-your_api_keyimport OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.GREENPT_API_KEY,
baseURL: 'https://api.greenpt.ai/v1',
});from openai import OpenAI
client = OpenAI(
api_key="YOUR_GREENPT_API_KEY",
base_url="https://api.greenpt.ai/v1",
)5. Make your first API call
Test your integration with a simple chat-completion request.
curl https://api.greenpt.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GREENPT_API_KEY" \
-d '{
"model": "gemma4",
"messages": [
{ "role": "user", "content": "Hello, how are you?" }
],
"stream": false
}'6. Verify the connection
List available models to confirm your client is configured correctly.
curl https://api.greenpt.ai/v1/models \
-H "Authorization: Bearer $GREENPT_API_KEY"