OpenAI SDK Quickstart: Send Your First API Request
Connect the OpenAI SDK to SailQ with your API key, base URL and model ID. Copy a Python, TypeScript or curl example to send your first request.
Create an API key and fund your balance. Install the SDK with python -m pip install openai, then run this Python example.
import os
from getpass import getpass
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("SAILQ_API_KEY") or getpass("SailQ API key: "),
base_url="https://api.sailq.ai/v1",
)
reply = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.choices[0].message.content)