HexaClawHexaClaw
← Back to Blog

Getting Started with HexaClaw in 5 Minutes

·HexaClaw Team

This guide walks you through setting up HexaClaw and making your first API request. Total time: about 5 minutes.

Step 1: Create Your Account

Head to hexaclaw.com/signup and create an account with your email or Google sign-in. You'll get a 7-day trial with 200 credits.

Step 2: Get Your API Key

After signing up, go to your API Keys dashboard and create a new key. It will look like hx_live_abc123.... Save it somewhere safe — you won't be able to see it again.

Step 3: Make Your First Request

HexaClaw is OpenAI-compatible. Use any OpenAI SDK or plain HTTP:

Python (OpenAI SDK):

from openai import OpenAI

client = OpenAI(
    api_key="hx_live_your_key_here",
    base_url="https://api.hexaclaw.com/v1"
)

response = client.chat.completions.create(
    model="gemini-2.5-flash",
    messages=[{"role": "user", "content": "What is the capital of France?"}]
)

print(response.choices[0].message.content)

Node.js:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "hx_live_your_key_here",
  baseURL: "https://api.hexaclaw.com/v1",
});

const response = await client.chat.completions.create({
  model: "gemini-2.5-flash",
  messages: [{ role: "user", content: "What is the capital of France?" }],
});

console.log(response.choices[0].message.content);

curl:

curl https://api.hexaclaw.com/v1/chat/completions \
  -H "Authorization: Bearer hx_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-2.5-flash",
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'

Step 4: Try Different Services

Once your key is working, try the other services:

Web Search:

curl -X POST https://api.hexaclaw.com/v1/search \
  -H "Authorization: Bearer hx_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"query": "latest AI news", "count": 5}'

Image Generation:

curl -X POST https://api.hexaclaw.com/v1/images/generate \
  -H "Authorization: Bearer hx_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A futuristic city at sunset", "model": "schnell"}'

Text-to-Speech:

curl -X POST https://api.hexaclaw.com/v1/audio/speech \
  -H "Authorization: Bearer hx_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello from HexaClaw!", "voice": "alloy"}' \
  --output speech.mp3

Step 5: Monitor Your Usage

Check your credit balance and usage at any time in the Usage dashboard or via the API:

curl https://api.hexaclaw.com/v1/usage \
  -H "Authorization: Bearer hx_live_your_key_here"

Available Models

Here are some popular models to get started:

| Model | Provider | Best For | Cost per 1M tokens (credits) | |-------|----------|----------|------------------------------| | gemini-2.5-flash | Google | Fast, cheap tasks | 15 in, 60 out | | claude-haiku-4-5 | Anthropic | Quick reasoning | 100 in, 500 out | | claude-sonnet-4-6 | Anthropic | Balanced quality | 390 in, 1950 out | | gpt-4.1 | OpenAI | Complex tasks | 260 in, 1040 out |

See all 26+ models via the API: GET https://api.hexaclaw.com/v1/models (requires auth).

CLI Installation

For a full local setup with the OpenClaw agent framework:

curl -sSL https://hexaclaw.com/install-cli | bash

This installs the CLI, configures your credentials, and starts the local gateway. You can then use hexaclaw agent --message "Hello" to talk to your agent directly from the terminal.

Need Help?