Quick Start
此内容尚不支持你的语言。
Get up and running with HiAPI in 3 minutes.
-
Get your API key
Sign up at hiapi.ai, then go to Dashboard → API Keys to create a new key.
-
Add credits
Go to Dashboard → Billing to add credits. New accounts get free trial credits.
-
Make your first request
Terminal window curl -X POST https://api.hiapi.ai/v1/images/generations \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "dall-e-3","prompt": "a futuristic city at sunset","size": "1024x1024"}'from openai import OpenAIclient = OpenAI(api_key="YOUR_API_KEY",base_url="https://api.hiapi.ai/v1")response = client.images.generate(model="dall-e-3",prompt="a futuristic city at sunset",size="1024x1024")print(response.data[0].url)import OpenAI from "openai";const client = new OpenAI({apiKey: "YOUR_API_KEY",baseURL: "https://api.hiapi.ai/v1"});const response = await client.images.generate({model: "dall-e-3",prompt: "a futuristic city at sunset",size: "1024x1024"});console.log(response.data[0].url); -
View the result
The response contains the image URL. Open it in your browser to see your generated image.
Next Steps
Section titled “Next Steps”- Browse all available models
- Read the Image Generation Guide for advanced usage
- Check the API Reference for all endpoints