HFAI Cloud Docs
Start in about
thirty seconds.
Mint a key, point any OpenAI-compatible client at the endpoint, and send your first request.
Quickstart
Four steps from a wallet
to your first response.
-
01 / CREATE A KEY
Create a key in HFAI Cloud
Connect a Solana wallet, fund the balance with
$HFAI, and mint an API key. The key is shown once and looks likehfai_live_…. -
02 / SET THE BASE URL
Set the base URL
Point your client at
https://api.heartflowai.net/v1— the same base URL for every model in the catalogue. -
03 / SEND A REQUEST
Send one request
Any OpenAI-compatible client works. One
curlcall is enough to check that the key is live. -
04 / READ THE RESPONSE
Read the response
The reply arrives in
choices[0].message.content, metered at the model’s list price.
curl https://api.heartflowai.net/v1/chat/completions \
-H "Authorization: Bearer hfai_live_…" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"Hello HFAI"}]}'
POST /v1/chat/completions— streaming chat, OpenAI-compatible.GET /v1/models— the live model catalogue and pricing.
Replace hfai_live_… with a key from the app, and set the base URL to https://api.heartflowai.net/v1. Runnable examples for three languages are on the developers guide.
The full reference
Ten pages covering the API end to end.
Each one opens in a new tab.
- OverviewThe API in one page, and where to go next.
- Getting startedThe path from a wallet to your first successful request.
- Authentication (Sign-In With Solana)How a wallet session is established.
- Creating and using API keysMinting an
hfai_live_…key and using it in a client. - Chat completions (request and streaming shape)The request body, the response shape and the streamed deltas.
- ModelsThe catalogue: model ids, context windows and prices.
- Credits and billingTopping up with $HFAI and how usage is deducted.
- UsageReading request history and the tokens each call used.
- Errors and rate limitsStatus codes, error bodies and the limits that apply to a key.
- ExamplesComplete example requests to copy into a client.
Next steps
Where the quickstart leads
once your first request lands.
- HFAI Cloud — the models, the flow and the price table.
- Pricing — pass-through billing per 1M tokens, with no markup.
- For developers — curl, Python and JavaScript examples for the same endpoint.
Mint a key.
Send your first request.
Sign in with a Solana wallet, fund your balance with $HFAI, and copy the quickstart above.