BUILD WITH MEIKAI

A few lines.
A world of possibilities.

One OpenAI-compatible endpoint for the Meikai model catalog. Bring your Meikai token, pick a model, and start building.

BASE URLhttps://ai.meikai.net/v1

01 Get access

Meikai is available by invitation. Ask your Meikai administrator for a personal API token. Tokens start with mk-. The docs and model catalog are public; API requests need an issued token.

Set the token in your environment before running an example:

shell
export MEIKAI_AI_KEY="mk-your-token-here"

Use only the personal Meikai token issued to you; do not share it. Ask your administrator to revoke and replace a token if it leaks.

02 Make your first request

These examples send the same request in three languages. No special client library is required. If you already use an OpenAI-compatible SDK, set its base URL and API key to the values above.

curl
curl https://ai.meikai.net/v1/chat/completions \
  -H "Authorization: Bearer $MEIKAI_AI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "meta-llama/Llama-3.3-70B-Instruct",
  "messages": [
    {
      "role": "user",
      "content": "Explain DNS in two sentences."
    }
  ],
  "max_tokens": 2048
}'

Read the answer from choices[0].message.content. The usage object reports token counts when available.

03 Choose a model

Browse the model catalog and pass an exact model ID in every request. Check which models your token can access through the authenticated models endpoint:

curl
curl https://ai.meikai.net/v1/models -H "Authorization: Bearer $MEIKAI_AI_KEY"
Always choose a model explicitly.

The compatibility default for requests that omit model is zai-org/GLM-5.2. Model discovery can omit this default.

The model list can also include black-forest-labs/FLUX.2-klein-4B for image generation. Use a text model for chat completions and the playground.

POST /v1/chat/completions

Chat completions

Send a conversation as a messages array. Include earlier user and assistant messages for a multi-turn conversation. Capabilities and supported parameters vary by model.

Chat completion parameters
ParameterTypeUse
modelstringExact model ID from the Meikai catalog.
messagesarrayRequired. Objects with role and content.
max_tokensintegerOutput budget. Start with 2048; reasoning may use part of it.
temperaturenumberSampling control, if supported by the model.
streambooleanSet to true for server-sent events.
Illustrative response · abbreviated
{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "DNS translates domain names into IP addresses."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 12,
    "total_tokens": 32
  }
}

Other /v1/* paths also require authentication. The gateway does not implement every OpenAI endpoint. Use GET /health for an unauthenticated gateway health check; it does not check inference availability.

Stream the answer

Add "stream": true and read the response as server-sent events. Each JSON event can contain choices[0].delta.content; the data: [DONE] event ends the stream. Some events contain only usage, metadata, or reasoning, so do not assume every event has answer text.

text/event-stream
data: {"choices":[{"delta":{"content":"Hello"}}]}

data: {"choices":[{"delta":{"content":" there."}}]}

data: [DONE]

The playground handles streaming, shows reasoning separately when returned, and lets you stop a request. The playground currently sends text messages; it does not upload images or execute tools.

Errors & troubleshooting

HTTP error codes
StatusWhat to do
400Check that the body is a JSON object and the model supports the parameters.
401Supply an Authorization: Bearer <token> header.
403The token may be invalid or revoked. Ask your administrator.
404Check the route and model ID. The model may no longer be available.
429Wait before retrying; service usage limits may apply.
502 / 503The service may be unavailable. Try again later.
An empty answer can mean a small token budget.

Reasoning models may spend their output budget before producing visible answer text. If finish_reason is length, increase max_tokens. Reasoning may appear in reasoning_content separately from content.

Gateway errors use {"error":{"message":"…","type":"meikai_gateway"}}. Service errors are presented with Meikai messages; contact your administrator if a problem persists.

Data & privacy

Usage is tagged to your personal token's label. Service logs may retain prompts and responses for operation and troubleshooting.

The playground keeps its token and conversation in the current page's memory, and sends them only when you make API requests. Reloading or leaving the page clears them. “Disconnect” clears the token and chat immediately. Copyable examples use MEIKAI_AI_KEY, never your actual token.

Use the service for approved internal work. Do not send credentials, customer personal data, or confidential material that is not approved for these services.

Ready to give it a try?Open playground ↗