Documentation Navigation
On This Page

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

Get Started in Three Steps

  1. Create a key: Open “API Keys” in the console and create a dedicated key for the current application.
  2. Confirm the model: Check the currently available text or image models, prices, groups, and image-generation permissions in the console.
  3. Send a minimal request: For text, verify Responses first. For images, verify generations first, then add edit, streaming, or asynchronous parameters.
cURL · Responses
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

PurposeURLDescription
OpenAI SDK Base URLhttps://api.khaix.net/v1Lets the SDK append request paths automatically
ResponsesPOST /v1/responsesFor Codex and clients that support Responses
Chat CompletionsPOST /v1/chat/completionsFor general OpenAI-compatible clients
Anthropic MessagesPOST /v1/messagesFor Claude Code and Messages clients
Images generationsPOST /v1/images/generationsOpenAI gpt-image-2 image generation
Images editsPOST /v1/images/editsImage 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 console for available models, 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 URL is the address to which an SDK appends a path; an endpoint is the final HTTP request URL.
  • Client interfaces may change between versions. Follow the protocol and URL specified on each integration page.
  • See the Billing Guide for billing rules and the API Relay Guide for service boundaries.