OpenAI-compatible clients
https://model.misakacloud.net/v1Includes /v1. Send Authorization: Bearer <key>.
An endpoint for your next agent
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.
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/v1Includes /v1. Send Authorization: Bearer <key>.
Anthropic SDK clients
https://model.misakacloud.netThe 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.
选择工具,合并配置,然后在同一个终端启动。使用本站发放的密钥;不用登录 OpenAI,也不需要在这个网页里填写任何秘密。
这里是配置教程,不是在线 API 调试器。 复制按钮只复制示例文字;本页不会读取、保存或发送你的密钥。教程中的请求仍发往正式 API,实际推理可能产生费用。
在你自己的终端输入密钥,再查询这个密钥可用的模型 ID。
以下环境变量只对当前终端及其子进程有效。新开终端、从桌面启动 IDE,可能需要重新设置。
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"
$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 功能。
编辑或创建 models.yml。如果已有 providers:,把 misakacloud 合并进去,不要覆盖其他 provider。
Windows:%USERPROFILE%\.omp\agent\models.yml。使用命名 profile 时,编辑该 profile 的 agent 目录。
apiKey: MODEL_API_KEY 是环境变量名,不是实际密钥。启动前必须完成上方的设置。baseUrl 已包含 /v1,不要再添加 /responses。api 改为 openai-completions。按 omp 18.14.2 核对。已验证配置加载及无效密钥的 401 路径;未以真实密钥验收完整编码工作流。
# 先把 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
# 替换为 models.yml 中相同的实际模型 ID,不要原样运行
omp --model misakacloud/YOUR_MODEL_ID
合并配置到用户级 config.toml。顶层的前三个设置放在第一个表头之前;同名键和表不要重复定义。
Windows:%USERPROFILE%\.codex\config.toml。如果用过其他 provider,也检查当前生效的 profile 是否覆盖了这些设置。
env_key 填环境变量名。不需要执行 codex login 来登录本站。/v1/models 不是 Codex 专用模型目录,不要填作 model_catalog_url。按 Codex CLI 0.166.0 官方资料核对;旧版本可能不支持 capabilities 配置。本轮未在本机启动 Codex 或执行真实推理。
# 先把 YOUR_MODEL_ID 替换为当前密钥可用的实际模型 ID
model = "YOUR_MODEL_ID"
model_provider = "misakacloud"
web_search = "disabled"
[model_providers.misakacloud]
name = "MisakaCloud"
base_url = "https://model.misakacloud.net/v1"
env_key = "MODEL_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false
[model_providers.misakacloud.capabilities]
remote_compaction = "unsupported"
codex
为什么关闭远程压缩和 WebSocket? 本站公开的是 HTTP/SSE 推理接口,不包含 /v1/responses/compact,也不接受 WebSocket Upgrade。上面的配置不需要扩大本站接口范围。
密钥只放在你自己的环境变量或密钥管理器中,不写进 YAML、TOML、URL 或代码仓库。不要把 YOUR_MODEL_ID 留在实际配置里;成功返回一条文本,也不等于工具调用、压缩和长会话全部兼容。
确认在同一个终端设置了 MODEL_API_KEY,并使用本站密钥而不是上游密钥。omp 在变量缺失时可能把 MODEL_API_KEY 这段文字当作密钥发送;桌面 IDE 也未必继承终端变量。不要把密钥发给别人排错。
重新用这个密钥查询 GET /v1/models,并核对模型 ID 的大小写和完整名称。若仍被拒绝,请联系服务提供方确认模型权限。
OpenAI-compatible base URL 应为 https://model.misakacloud.net/v1,不要重复 /v1、追加 /responses 或增加尾斜杠。本站不开放登录、上传、WebSocket 和 /responses/compact;Codex 使用 wire_api = "responses",不能改成 "chat"。
查询模型列表只能确认候选 ID,不能证明 Responses、工具调用和上下文容量都兼容。请核对该模型的实际能力,以及客户端使用的模型元数据。不要随意增大上下文上限或照抄其他中转站的模型目录地址。
Five published routes. Choose a model returned by the authenticated models endpoint; model support and availability depend on the selected provider.
/v1/modelsDiscover available model IDs/v1/chat/completionsOpenAI Chat Completions/v1/responsesOpenAI Responses, HTTP / SSE/v1/messagesAnthropic Messages/v1/messages/count_tokensAnthropic token countingPaths and methods are exact. Alternate aliases, trailing slashes, WebSocket routes, and administrative interfaces are not published here.
A predictable interface for long-running agents. These are gateway limits, not a replacement for each model's context window or provider constraints.
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.
Set stream: true for SSE. Use curl -N to see events as they arrive. The request-size ceiling does not cap the response length.
POST requests require a JSON content type. Compressed bodies are rejected. Keep credentials in authentication headers; never put them in the URL.
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.
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.
Choose a model returned by GET /v1/models with your key, or ask the service operator to update its permissions.
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.
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.
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.