Account session

POST /core/v1/playground/chat/completions

Account session · POST /core/v1/playground/chat/completions

仅当前有效登录会话;无需创建或选择 API Key。复用账号分组、钱包预留、原价格与唯一结算。未知结果保留占款,查询原意图。已受理执行不因退出登录取消。

POST/core/v1/playground/chat/completions

Authorizations

Authorizationstringrequired

Use an account session; required access: Account session.

Authorization: Bearer $ONEASTER_SESSION_TOKEN

Parameters

Idempotency-Keystringrequired

header · 一次用户意图的稳定标识;网络重试保持原键和输入。

Body · application/json

modelstringrequired
messagesarrayrequired
max_tokensinteger
max_completion_tokensinteger
streamboolean
temperaturenumber
top_pnumber
toolsarray
tool_choiceobject
parallel_tool_callsboolean
response_formatobject
reasoning_effortstring
nobject
JSON Schema
{
  "type": "object",
  "additionalProperties": true,
  "required": [
    "model",
    "messages"
  ],
  "description": "丰富Chat格式;纯文本旧格式仍要求max_tokens与Idempotency-Key。未列出字段须符合受支持目标协议。",
  "properties": {
    "model": {
      "type": "string"
    },
    "messages": {
      "type": "array",
      "minItems": 1,
      "maxItems": 128,
      "items": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "role": {
            "enum": [
              "system",
              "developer",
              "user",
              "assistant",
              "tool"
            ]
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "tool_calls": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "tool_call_id": {
            "type": "string"
          }
        }
      }
    },
    "max_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    },
    "max_completion_tokens": {
      "type": "integer",
      "minimum": 1,
      "maximum": 65536
    },
    "stream": {
      "type": "boolean"
    },
    "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2
    },
    "top_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "tools": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "tool_choice": {},
    "parallel_tool_calls": {
      "type": "boolean"
    },
    "response_format": {
      "type": "object",
      "additionalProperties": true
    },
    "reasoning_effort": {
      "type": "string"
    },
    "n": {
      "const": 1
    }
  }
}