TokenRa
登录注册

CHAT COMPLETIONS API

stealth/ox-alpha · OpenAI 兼容

Ox Alpha 模型 API 文档

通过 OpenAI 兼容的 Chat Completions 接口调用 Ox Alpha 模型。模型支持文本对话与 reasoning 内容返回,适合直接接入现有 OpenAI SDK。

01

POST / CHAT / COMPLETIONS

发送对话请求

HTTP MethodPOST
请求路径https://tokenra.io/v1/chat/completions
鉴权头部Authorization: Bearer sk-your_token
模型名称stealth/ox-alpha
BASH / JSON
curl -X POST https://tokenra.io/v1/chat/completions \
  -H "Authorization: Bearer sk-your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "stealth/ox-alpha",
    "messages": [
      {
        "role": "user",
        "content": "请介绍一下你自己"
      }
    ],
    "temperature": 1,
    "top_p": 0.95,
    "max_tokens": 1024
  }'
请求体遵循 OpenAI Chat Completions 格式;将示例中的 API Key 替换为您自己的密钥即可调用。
02

REQUEST BODY

请求参数

参数 类型 默认值 说明
model string - 模型标识,固定使用 stealth/ox-alpha
messages array - 对话消息列表。每条消息包含 rolecontent
reasoning map - 控制支持 reasoning 的模型的推理行为。可按 OpenAI 兼容格式传递。
max_tokens integer - 限制模型最多生成的 token 数量。
temperature float 1 控制输出的随机性与多样性。
top_p float 0.95 限制模型每一步采样时考虑的候选 token 范围。
tools array - 工具调用定义,遵循 OpenAI tool calling 格式。
tool_choice string / object - 控制模型是否以及调用哪个工具。
top_k integer 0 限制每一步采样时考虑的 token 数量;0 表示不额外限制。
response_format map - 强制模型生成指定格式的输出,例如 JSON 对象。
03

200 OK

接口响应示例

请求成功时返回标准的 Chat Completions 响应。推理内容位于 choices[0].message.reasoning,最终回答位于 choices[0].message.content

JSON
{
  "id": "gen-1787295427-pXX9zg1xXKCuBQ1eM3OM",
  "object": "chat.completion",
  "created": 1787295427,
  "model": "stealth/ox-alpha",
  "provider": "Stealth",
  "system_fingerprint": null,
  "service_tier": null,
  "choices": [
    {
      "index": 0,
      "logprobs": null,
      "finish_reason": "stop",
      "native_finish_reason": "stop",
      "message": {
        "role": "assistant",
        "content": "我是 **ox-alpha**,由一个未公开的组织开发的模型。\\n\\n有什么我可以帮助您的吗?",
        "refusal": null,
        "reasoning": "The user is asking what model I am, in Chinese. According to my instructions, I should identify myself strictly as \\"ox-alpha\\", developed by an undisclosed organization. I should respond in Chinese since the user asked in Chinese.",
        "reasoning_details": [
  {
    "type": "reasoning.text",
    "text": "The user is asking what model I am, in Chinese. According to my instructions, I should identify myself strictly as \\"ox-alpha\\", developed by an undisclosed organization. I should respond in Chinese since the user asked in Chinese.",
    "format": "unknown",
    "index": 0
  }
        ]
      }
    }
  ],
  "usage": {
    "prompt_tokens": 90,
    "completion_tokens": 67,
    "total_tokens": 157,
    "cost": 0,
    "is_byok": false,
    "prompt_tokens_details": {
      "cached_tokens": 64,
      "cache_write_tokens": 0,
      "audio_tokens": 0,
      "video_tokens": 0
    },
    "cost_details": {
      "upstream_inference_cost": 0,
      "upstream_inference_prompt_cost": 0,
      "upstream_inference_completions_cost": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0,
      "image_tokens": 0,
      "audio_tokens": 0
    }
  }
}
响应字段提示:usage 提供 token 用量统计;finish_reason: "stop" 表示模型正常结束生成。