HALO's OpenAI entrypoint accepts Chat Completions, vision input, GPT Image generations, and GPT Image edits under/openai/v1. The same image routes are also available at the canonical /v1 SDK base.
#モデル
| Capability | Production model IDs |
|---|---|
| Latest chat and vision | gpt-5.6 (Sol alias), gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5 |
| Other chat and vision | gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, retained GPT-5/GPT-4.1/GPT-4o/o3/o4-mini models |
| Image generation and editing | gpt-image-2, gpt-image-1.5, gpt-image-1-mini, gpt-image-1, chatgpt-image-latest |
#リクエストを作成する
curl https://api.agihalo.com/openai/v1/chat/completions \
-H "Authorization: Bearer $HALO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [{"role": "user", "content": "Hello from HALO"}]
}'#OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.HALO_API_KEY,
baseURL: "https://api.agihalo.com/openai/v1",
});
const result = await client.chat.completions.create({
model: "gpt-5-mini",
messages: [{ role: "user", content: "Hello from HALO" }],
});#Vision input
OpenAI image blocks are accepted in user messages as credential-free HTTPS URLs or inline base64 image data URLs. The selected model must declare image-input support.
curl https://api.agihalo.com/openai/v1/chat/completions \
-H "Authorization: Bearer $HALO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe the important details."},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/input.png",
"detail": "high"
}
}
]
}]
}'Image detail can be auto, low, orhigh. original is limited to the base GPT-5.4, GPT-5.5, and GPT-5.6 models that expose that capability.
#Generate & edit images
curl https://api.agihalo.com/openai/v1/images/generations \
-H "Authorization: Bearer $HALO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A glass observatory above a moonlit cloud layer",
"size": "1536x1024",
"quality": "high",
"output_format": "png"
}'curl https://api.agihalo.com/openai/v1/images/edits \
-H "Authorization: Bearer $HALO_API_KEY" \
-F "model=gpt-image-2" \
-F "prompt=Add a watercolor texture" \
-F "image[]=@source.png" \
-F "mask=@mask.png"Image edits accept one to sixteen JSON HTTPS/data-URL references or multipart image/image[] uploads, plus one optional mask. Generation and edit streams are forwarded without buffering the returned base64 payload.
#制限
- OpenAI
file_idvalues are account-bound and unavailable on shared HALO platform routes. Upload the file or use an HTTPS/data URL. - JSON and multipart image request bodies are capped at 64 MB.
- Provider-owned files, caches, conversations, tools, unsafe URLs, unknown fields, and unsupported capabilities fail closed.
- DeepSeek and custom model-family routes remain text-only.
#ゲートウェイの動作
The gateway validates a priced model, selects an eligible platform key, forwards the canonical request, parses upstream usage, and bills the completed response. GPT Image billing records provider-reported text input, image input, image output, and generated image count. Authentication errors use an OpenAI-style error envelope.
See the current upstream references for models, pricing, and image generation.