OpenAI Compatible

Quickstart

Start building with aihubspot in under a minute using the OpenAI SDK.

How it works

aihubspot exposes an OpenAI-compatible endpoint. You use the exact same OpenAI SDK you already know — just point base_url / baseURL at https://api.aihubspot.app/v1 and use your aihubspot API key.

No new SDK to install. No new API to learn.

Your first request

from openai import OpenAI
 
client = OpenAI(
    api_key="AH_SMKRPA_YOUR_KEY",       # your aihubspot key
    base_url="https://api.aihubspot.app/v1",
)
 
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
)
 
print(response.choices[0].message.content)

Already using the OpenAI SDK? It's a two-line change: add base_url and swap the key. That's it.

Prerequisites

  • An aihubspot account (sign up here)
  • An API key from the API Console
  • openai Python package or npm package installed

Authentication

All requests use Bearer token auth:

Authorization: Bearer AH_SMKRPA_YOUR_KEY_HERE

Never commit your API key to source control. Use environment variables or a secrets manager.

Available models

Model IDProviderContext
gpt-4oOpenAI128k
claude-3-5-sonnetAnthropic200k
llama-3-70bMeta32k

See the full Models page for all available models and BDT pricing.

Next steps