Skip to content

推理相关模型文档

API 基础地址:https://apiok.cc

1. 账号获取

ApiOk 账号可通过以下方式获取:

方式说明
联系创建联系系统运营人员或销售创建账号
自助注册访问注册地址:https://apiok.cc/register

2. 控制台登录

项目地址
系统首页https://apiok.cc
登录地址https://apiok.cc/login

使用账号和密码登录控制台即可。

3. 获取 API 访问密钥

登录控制台后,进入 API 密钥 页面查看默认密钥。

也可以点击右上方 + 新增密钥 按钮创建新密钥。

说明:密钥名称用于记录密钥用途和后续调用账单拆分,建议使用有意义的名称。

4. 接口调用示例

平台文档建设中,以下示例以当前常见调用方式为准。

重要说明

  • 由于厂商通道原因,模型调用时可能出现调用失败。如遇失败,可先尝试重试。
  • 如果连续重试失败,请联系 ApiOk 支持人员。
  • 由于厂商侧会调整模型,ApiOk 平台上的模型也会进行适应性调整。本文档中的模型示例可能后续被替换或下线,但调用方式基本相同。
  • 最新可用模型请以 ApiOk 平台控制台展示为准。

4.1 支持的模型模型

  • claude-opus-4-6

  • claude-opus-4-7

  • claude-opus-4-8

  • claude-sonnet-4-6

  • claude-fable-5

  • claude-opus-5

  • claude-sonnet-5

  • gpt-5.4

  • gpt-5.5

  • gpt-5.6-luna

  • gpt-5.6-sol

  • gpt-5.6-terra

  • 支持的接口 v1/messagesv1/responsesv1/completionsv1/chat/completions

Chat Completions

  • 请求示例
bash
curl https://apiok.cc/v1/chat/completions \
  -H "Authorization: Bearer $APIKEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-7",
    "messages": [
      {
        "role": "user",
        "content": "who are you?"
      }
    ],
    "stream": false
  }'
  • claude返回示例
json
{
    "id": "msg_01E4j0IWLd6BKc8F6uCFevfl",
    "object": "chat.completion",
    "created": 1785402797,
    "model": "claude-opus-4-7",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "I'm Claude, an AI assistant made by Anthropic. How can I help you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 2239,
        "completion_tokens": 56,
        "total_tokens": 2295,
        "prompt_tokens_details": {
            "cached_tokens": 1891,
            "cache_creation_tokens": 347
        }
    }
}
  • gpt返回示例
json
{
    "id": "resp_05fbc55aab61dcc8016a6b16f727f8819b89c111a217dd24a5",
    "object": "chat.completion",
    "created": 1785403128,
    "model": "gpt-5.5",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Hi! How can I help you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 7,
        "completion_tokens": 13,
        "total_tokens": 20
    }
}

Messages API 调用

  • 请求示例
bash
curl https://apiok.cc/v1/messages \
  -H "Authorization: Bearer $APIKEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4-7",
    "max_tokens": 256,
    "messages": [
      {
        "role": "user",
        "content": "who are you?"
      }
    ]
  }'
  • claude返回示例
json
{
    "id": "msg_01CL2ExuesyRprqt2DdGsYoA",
    "type": "message",
    "role": "assistant",
    "content": [
        {
            "type": "text",
            "text": "Hi there! How's it going? Is there something I can help you with,"
        }
    ],
    "stop_reason": "max_tokens",
    "model": "claude-opus-4-7",
    "usage": {
        "input_tokens": 8,
        "cache_creation_input_tokens": 0,
        "cache_read_input_tokens": 0,
        "output_tokens": 20,
        "claude_cache_creation_5_m_tokens": 0,
        "claude_cache_creation_1_h_tokens": 0,
        "billing_usage": {
            "source": "oai_chat",
            "semantic": "openai",
            "openai_usage": {
                "prompt_tokens": 8,
                "completion_tokens": 20,
                "total_tokens": 28,
                "prompt_tokens_details": {
                    "cached_tokens": 0,
                    "text_tokens": 0,
                    "audio_tokens": 0,
                    "image_tokens": 0
                },
                "completion_tokens_details": {
                    "text_tokens": 0,
                    "audio_tokens": 0,
                    "image_tokens": 0,
                    "reasoning_tokens": 0
                },
                "input_tokens": 0,
                "output_tokens": 0,
                "input_tokens_details": null,
                "claude_cache_creation_5_m_tokens": 0,
                "claude_cache_creation_1_h_tokens": 0
            }
        }
    }
}
  • gpt返回示例
json
{
    "id": "resp_05eba3345716fa55016a6b172f6fa4819b8cd5eaafd545a714",
    "type": "message",
    "role": "assistant",
    "content": [
        {
            "type": "text",
            "text": "Hi! How can I help you today?"
        }
    ],
    "stop_reason": "end_turn",
    "model": "gpt-5.5",
    "usage": {
        "input_tokens": 7,
        "cache_creation_input_tokens": 0,
        "cache_read_input_tokens": 0,
        "output_tokens": 13,
        "claude_cache_creation_5_m_tokens": 0,
        "claude_cache_creation_1_h_tokens": 0,
        "billing_usage": {
            "source": "oai_chat",
            "semantic": "openai",
            "openai_usage": {
                "prompt_tokens": 7,
                "completion_tokens": 13,
                "total_tokens": 20,
                "prompt_tokens_details": {
                    "cached_tokens": 0,
                    "text_tokens": 0,
                    "audio_tokens": 0,
                    "image_tokens": 0
                },
                "completion_tokens_details": {
                    "text_tokens": 0,
                    "audio_tokens": 0,
                    "image_tokens": 0,
                    "reasoning_tokens": 0
                },
                "input_tokens": 0,
                "output_tokens": 0,
                "input_tokens_details": null,
                "claude_cache_creation_5_m_tokens": 0,
                "claude_cache_creation_1_h_tokens": 0
            }
        }
    }
}

Responses API 调用 GPT 模型

  • 请求示例
bash
curl https://apiok.cc/v1/responses \
  -H "Authorization: Bearer $APIKEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "input": "who are you?"
  }'
  • gpt返回示例
json
{
    "id": "resp_04e5f1840d48006b016a6b17a079c48198a9a0f908cc12863d",
    "object": "response",
    "created_at": 1785403296,
    "status": "completed",
    "background": false,
    "completed_at": 1785403297,
    "error": null,
    "frequency_penalty": 0.0,
    "incomplete_details": null,
    "instructions": "You are Codex",
    "max_output_tokens": null,
    "max_tool_calls": null,
    "model": "gpt-5.5",
    "moderation": null,
    "output": [
        {
            "id": "msg_04e5f1840d48006b016a6b17a155a48198bcf3c9a67234f257",
            "type": "message",
            "status": "completed",
            "content": [
                {
                    "type": "output_text",
                    "annotations": [],
                    "logprobs": [],
                    "text": "Hi. What do you need help with?"
                }
            ],
            "phase": "final_answer",
            "role": "assistant"
        }
    ],
    "parallel_tool_calls": true,
    "presence_penalty": 0.0,
    "previous_response_id": null,
    "prompt_cache_key": "84bee1f2-51aa-495c-aabe-1b2963e5c5fa",
    "prompt_cache_retention": "24h",
    "reasoning": {
        "context": "current_turn",
        "effort": "medium",
        "mode": "standard",
        "summary": null
    },
    "safety_identifier": "user-fDfny1m3W75lxO7JzVSMQ6Hq",
    "service_tier": "default",
    "store": false,
    "temperature": 1.0,
    "text": {
        "format": {
            "type": "text"
        },
        "verbosity": "medium"
    },
    "tool_choice": "auto",
    "tool_usage": {
        "image_gen": {
            "input_tokens": 0,
            "input_tokens_details": {
                "image_tokens": 0,
                "text_tokens": 0
            },
            "output_tokens": 0,
            "output_tokens_details": {
                "image_tokens": 0,
                "text_tokens": 0
            },
            "total_tokens": 0
        },
        "web_search": {
            "num_requests": 0
        }
    },
    "tools": [],
    "top_logprobs": 0,
    "top_p": 0.98,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 4389,
        "input_tokens_details": {
            "cache_write_tokens": 0,
            "cached_tokens": 3840
        },
        "output_tokens": 13,
        "output_tokens_details": {
            "reasoning_tokens": 0
        },
        "total_tokens": 4402
    },
    "user": null,
    "metadata": {}
}
  • claude返回示例
json
{
    "id": "msg_01CL2ExuesyRprqt2DdGsYoA",
    "object": "response",
    "model": "claude-opus-4-7",
    "status": "incomplete",
    "output": [
        {
            "type": "message",
            "id": "item_492202fd3cc999176057f2a6",
            "role": "assistant",
            "content": [
                {
                    "type": "output_text",
                    "text": "Hi there! How's it going? Is there something I can help you with,"
                }
            ],
            "status": "completed"
        }
    ],
    "usage": {
        "input_tokens": 8,
        "output_tokens": 20,
        "total_tokens": 28
    },
    "incomplete_details": {
        "reason": "max_output_tokens"
    }
}

4.2 GEMINI相关模型

  • gemini-3.1-pro-low
  • gemini-3.6-flash-high

请求示例

json
{
  "contents": [
    {
      "role":"user",
      "parts": [
        {
          "text": "high"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": [
      "TEXT"
    ]
  }
}

返回示例

json
{
    "candidates": [
        {
            "content": {
                "role": "model",
                "parts": [
                    {
                        "thoughtSignature": "EvcSCvQSARFNMg...",
                        "text": "Hello! 👋 \n\nDid you mean to type **\"hi\"**? If so, how are you doing today and how can I help you?\n\nOr did you mean \"high\" in a specific context? For example, are you looking for information about:\n*   High altitudes or mountains?\n*   High school?\n*   High technology?\n*   Something else entirely?\n\nLet me know what's on your mind!"
                    }
                ]
            },
            "finishReason": "STOP"
        }
    ],
    "usageMetadata": {
        "promptTokenCount": 2,
        "candidatesTokenCount": 92,
        "totalTokenCount": 732,
        "thoughtsTokenCount": 638
    },
    "modelVersion": "gemini-3.1-pro-low",
    "responseId": "_ztsatWGD_nvg8UPht71uAI"
}