API Documentation

Integrate ZapAI with simple HTTP calls — OpenAI-compatible interface

Quick Start

  1. 1Create an API Key on the Settings page. You'll get a key in the format sk-zap-xxxx (shown only once — save it securely).
  2. 2Send a POST request to the API endpoint with your key in the Authorization header.
  3. 3The system automatically routes to the best model based on request complexity, and tracks usage and costs.

API Endpoint

POST/api/v1/chat/completions

Compatible with the OpenAI Chat Completions protocol. The request body includes model and messages fields. Authenticate with Authorization: Bearer <your API Key>.

Code Examples

curl
curl -X POST https://zachie.site/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-zap- your-api-key" \
  -d '{
    "model": "hy3",
    "messages": [
      { "role": "user", "content": "Hello, introduce yourself" }
    ]
  }'
Python
import requests

resp = requests.post(
    "https://zachie.site/api/v1/chat/completions",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer sk-zap- your-api-key",
    },
    json={
        "model": "hy3",
        "messages": [
            {"role": "user", "content": "Hello, introduce yourself"}
        ],
    },
)
print(resp.json())
JavaScript
const resp = await fetch(
  "https://zachie.site/api/v1/chat/completions",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer sk-zap- your-api-key",
    },
    body: JSON.stringify({
      model: "hy3",
      messages: [{ role: "user", content: "Hello, introduce yourself" }],
  }),
);
const data = await resp.json();
console.log(data);

Supported Models & Pricing

ModelTierUse CaseInput Price (USD/M tokens)Output Price (USD/M tokens)
hy3BudgetDaily chat, casual conversation$0.14$0.54
deepseek-v4-flashStandardReasoning, code, analysis$0.72$3.60
glm-5.3PremiumComplex tasks, high-quality output$2.25$9.00

* The system automatically selects the best model based on request complexity. You can also explicitly specify the model field in your request.