Skip to content
INTERFACE MANUAL — 002model.misakacloud.net

An endpoint for your next agent

Your models.
One interface.

Connect OpenAI and Anthropic-compatible clients to a single HTTPS gateway. Familiar protocols. Streaming responses. No new workflow.

A client API key is required for every API request.

chat-completions.shHTTPS / JSON
Stream a chat completion
curl -N https://model.misakacloud.net/v1/chat/completions \
  -H "Authorization: Bearer $MODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3",
    "stream": true,
    "messages": [
      {"role": "user", "content": "Hello."}
    ]
  }'
TransportHTTPS / JSON requests
InterfacesOpenAI + Anthropic
StreamingSSE / standard SDKs

Bring your client.

Set the base URL for your SDK. Use a gateway client key supplied by the service operator, not an upstream provider key.

OpenAI-compatible clients

https://model.misakacloud.net/v1

Includes /v1. Send Authorization: Bearer <key>.

Anthropic SDK clients

https://model.misakacloud.net

The SDK adds /v1/messages. Send x-api-key and anthropic-version.

Keys belong in headers. Set MODEL_API_KEY in your environment before running an example. Keys in URL query parameters are rejected. This page never asks for, stores, or sends your API key.

把密钥接入你的 Coding Agent。

选择工具,合并配置,然后在同一个终端启动。使用本站发放的密钥;不用登录 OpenAI,也不需要在这个网页里填写任何秘密。

这里是配置教程,不是在线 API 调试器。 复制按钮只复制示例文字;本页不会读取、保存或发送你的密钥。教程中的请求仍发往正式 API,实际推理可能产生费用。

STEP 01 / PREPARE

先准备密钥与模型

在你自己的终端输入密钥,再查询这个密钥可用的模型 ID。

以下环境变量只对当前终端及其子进程有效。新开终端、从桌面启动 IDE,可能需要重新设置。

macOS / Linux · Bash
隐藏输入密钥 · 查询模型
read -rsp '本站 API Key: ' MODEL_API_KEY; echo
export MODEL_API_KEY
curl -fsS 'https://model.misakacloud.net/v1/models' \
  -H "Authorization: Bearer $MODEL_API_KEY"
Windows · PowerShell
隐藏输入密钥 · 查询模型
$key = Read-Host "本站 API Key" -AsSecureString
$env:MODEL_API_KEY = [System.Net.NetworkCredential]::new("", $key).Password
Remove-Variable key
curl.exe -fsS "https://model.misakacloud.net/v1/models" `
  -H "Authorization: Bearer $env:MODEL_API_KEY"

请勿直接复制后运行:先替换你自己的模型 ID。 YOUR_MODEL_ID 只是占位符,不是可用模型。请从上方响应的 data[].id 中选择当前密钥有权使用的模型,保留完整名称和大小写,并替换配置与启动命令中的所有占位符。omp 配置里的 id 必须与启动命令中的模型 ID 一致;不要照抄首页的 kimi-k3 聊天示例。

下方配置按 Responses API 编写,请选择已确认支持 Responses 和工具调用的模型;出现在列表中不代表兼容所有 Agent 功能。

API KEY → HTTP / SSE
STEP 02 / CONFIGURE

添加一个本站 provider

编辑或创建 models.yml。如果已有 providers:,把 misakacloud 合并进去,不要覆盖其他 provider。

~/.omp/agent/models.yml

Windows:%USERPROFILE%\.omp\agent\models.yml。使用命名 profile 时,编辑该 profile 的 agent 目录。

  • apiKey: MODEL_API_KEY 是环境变量名,不是实际密钥。启动前必须完成上方的设置。
  • baseUrl 已包含 /v1,不要再添加 /responses。
  • 只支持 Chat Completions 的模型,可将 api 改为 openai-completions。

按 omp 18.14.2 核对。已验证配置加载及无效密钥的 401 路径;未以真实密钥验收完整编码工作流。

models.yml · 合并,不覆盖
# 先把 YOUR_MODEL_ID 替换为当前密钥可用的实际模型 ID
providers:
  misakacloud:
    baseUrl: https://model.misakacloud.net/v1
    api: openai-responses
    auth: apiKey
    apiKey: MODEL_API_KEY
    authHeader: true
    remoteCompaction:
      enabled: false
    models:
      - id: YOUR_MODEL_ID
        name: MisakaCloud Coding Model
STEP 03 / RUN · 同一个终端
# 替换为 models.yml 中相同的实际模型 ID,不要原样运行
omp --model misakacloud/YOUR_MODEL_ID

为什么关闭远程压缩和 WebSocket? 本站公开的是 HTTP/SSE 推理接口,不包含 /v1/responses/compact,也不接受 WebSocket Upgrade。上面的配置不需要扩大本站接口范围。

密钥只放在你自己的环境变量或密钥管理器中,不写进 YAML、TOML、URL 或代码仓库。不要把 YOUR_MODEL_ID 留在实际配置里;成功返回一条文本,也不等于工具调用、压缩和长会话全部兼容。

第一次没连上?先检查这几项。

401密钥没有传进去,或密钥无效

确认在同一个终端设置了 MODEL_API_KEY,并使用本站密钥而不是上游密钥。omp 在变量缺失时可能把 MODEL_API_KEY 这段文字当作密钥发送;桌面 IDE 也未必继承终端变量。不要把密钥发给别人排错。

403当前密钥没有这个模型的权限

重新用这个密钥查询 GET /v1/models,并核对模型 ID 的大小写和完整名称。若仍被拒绝,请联系服务提供方确认模型权限。

404端点拼错,或客户端请求了未发布的接口

OpenAI-compatible base URL 应为 https://model.misakacloud.net/v1,不要重复 /v1、追加 /responses 或增加尾斜杠。本站不开放登录、上传、WebSocket 和 /responses/compact;Codex 使用 wire_api = "responses",不能改成 "chat"。

MODEL能聊天,但工具调用或长会话失败

查询模型列表只能确认候选 ID,不能证明 Responses、工具调用和上下文容量都兼容。请核对该模型的实际能力,以及客户端使用的模型元数据。不要随意增大上下文上限或照抄其他中转站的模型目录地址。

A deliberately small surface.

Five published routes. Choose a model returned by the authenticated models endpoint; model support and availability depend on the selected provider.

GET/v1/modelsDiscover available model IDs
POST/v1/chat/completionsOpenAI Chat Completions
POST/v1/responsesOpenAI Responses, HTTP / SSE
POST/v1/messagesAnthropic Messages
POST/v1/messages/count_tokensAnthropic token counting

Paths and methods are exact. Alternate aliases, trailing slashes, WebSocket routes, and administrative interfaces are not published here.

Know the boundaries.

A predictable interface for long-running agents. These are gateway limits, not a replacement for each model's context window or provider constraints.

[01]

80 MiB per request.

The hard body ceiling is 83,886,080 bytes, including JSON and base64 attachments. It applies to both fixed-length and chunked uploads. Provider limits can be smaller.

[02]

Stream the response.

Set stream: true for SSE. Use curl -N to see events as they arrive. The request-size ceiling does not cap the response length.

[03]

Send uncompressed JSON.

POST requests require a JSON content type. Compressed bodies are rejected. Keep credentials in authentication headers; never put them in the URL.

400Invalid request or query credentials

Check the JSON body and the model's requirements. Remove authentication parameters such as key, api_key, and token from the URL; use an authentication header instead.

401Missing or invalid client key

Use the gateway key supplied by the service operator. OpenAI clients send a Bearer token; Anthropic clients normally send x-api-key. An upstream provider key is not a substitute.

403Model not allowed for this key

Choose a model returned by GET /v1/models with your key, or ask the service operator to update its permissions.

404Route or method not published

Use an exact path and method from the reference above. Management pages, OAuth flows, upload APIs, realtime interfaces, and unspecified aliases are intentionally unavailable on this hostname.

413Request exceeds the body ceiling

Reduce accumulated history, tool results, or inline attachments. Base64 increases binary size by approximately one-third. The ceiling covers the entire serialized request, not just the newest message.

415Unsupported content type or encoding

Send application/json, optionally with a charset parameter, and an uncompressed request body. Do not use multipart uploads or gzip-compressed JSON on these routes.