Skip to content

Quickstart

This quickstart uses curl so you can verify your API key before adding SDK code. In an application, use the same base URL with the OpenAI SDK.

Sign up at console.subq.ai and create an API key from the dashboard. Store it in an environment variable:

Terminal window
export SUBQ_API_KEY="sk-your-api-key"

Make sure your account has credits before sending requests. A request without available credits returns 402.

Terminal window
curl https://api.subq.ai/v1/chat/completions \
-H "Authorization: Bearer $SUBQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "subq-preview",
"messages": [
{
"role": "user",
"content": "Summarize the integration path for a developer evaluating SubQ."
}
]
}'

For SDK examples, supported fields, streaming, and response shapes, continue to the Chat Completions API.

Authenticating...