Thanks to visit codestin.com
Credit goes to hao.ai

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 three protocol families — OpenAI-compatible, Anthropic, and SpaceXAI. 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-6-astra", "messages": [ {"role": "user", "content": "What is the meaning of life?"} ] }'

Next Steps