Skip to Content
DocsQuick Start

Quick Start

This guide helps you integrate with the HaoAI Gateway and start calling leading global models in just 3 minutes.

Prerequisites

  1. Go to the HaoAI Console 
  2. Open the API Keys page 
  3. Click Create API Key
  4. Have a development environment ready (Python 3.8+ / Node.js 18+)

HaoAI offers four protocol families — OpenAI-compatible, Anthropic, Grok / xAI, and Gemini. Grok uses its own route with an xAI OpenAI-compatible text interface.

Choose Your Protocol

OpenAI Compatible Protocol — The most universal integration method.

Terminal
# HaoAI API endpoint. Get your API Key at https://hao.ai/console/api-keys curl https://api.hao.ai/v1/chat/completions \ -H "Authorization: Bearer <your HAOAI_API_KEY>" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-5.4-mini", "messages": [ {"role": "user", "content": "What is the meaning of life?"} ] }'

Next Steps