Documentation
KHaiXAPI Documentation
Find text and image API URLs, authentication methods, and integration examples here. You can send HTTP requests directly or use the following pages to configure SDKs, coding agents, or desktop clients.
Choose an Integration
Call the Text API DirectlyView protocols, request fields, response structures, and cURL examples Call the Image Generation APIReview image generation, editing, and asynchronous task endpoints Use an SDK in Your CodeOpenAI-compatible Python, JavaScript, Vercel AI SDK, and LangChain Configure a Coding AgentCodex, OpenCode, Hermes, Cline, Kilo, OpenClaw, and more Configure a Desktop or Web ClientCherry Studio, Open WebUI, CC Switch, Claude Code, and other clients
Get Started in Three Steps
- Create a key: Open “API Keys” in the console and create a dedicated key for the current application.
- Confirm the model: Check currently available text or image models, prices, and groups in the Model Plaza; confirm image-generation permission for the current key in the console.
- Send a minimal request: For text, verify Responses first. For images, verify generations first, then add edit, streaming, or asynchronous parameters.
curl https://api.khaix.net/v1/responses \
-H "Authorization: Bearer sk-replace-with-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"input": "Reply with: connection successful"
}'An HTTP 200 response with text output, together with the corresponding console record, confirms that the key, URL, and model are configured correctly.
URLs and Authentication
| Purpose | URL | Description |
|---|---|---|
| OpenAI-compatible SDK Base URL | https://api.khaix.net/v1 | Lets the SDK append request paths automatically |
| Responses | POST /v1/responses | For Codex and clients that support Responses |
| Chat Completions | POST /v1/chat/completions | For general OpenAI-compatible clients |
| Anthropic Messages | POST /v1/messages | For Claude Code and Messages clients |
| Image Generation | POST /v1/images/generations | Image generation endpoint; see Model Plaza for the current model |
| Image Editing | POST /v1/images/edits | Image editing and masks |
OpenAI-compatible requests use Authorization: Bearer YOUR_API_KEY. Before entering a URL, confirm whether the application expects the site root, a Base URL, or a complete endpoint. Only a Base URL requires the application to append the request path.
Documentation Conventions
- Models in the examples demonstrate configuration formats. Refer to the Model Plaza for available models, groups, prices, and multipliers.
- Start with a basic request without reasoning effort, tools, or structured output. Add parameters one at a time after confirming connectivity.
- A
Base URLis the address to which an SDK appends a path; anendpointis the final HTTP request URL. - Client interfaces may change between versions. Follow the protocol and URL specified on each integration page.
- See the Billing Guides for billing rules and the Gateway Guides for service boundaries.