openapi: 3.2.0 info: title: Sakura Internet Messages API version: 1.0.1 description: 'Operations tagged Messages across 2 of this provider''s published API definitions: ai-engine-inference-api.yaml, sakura-internet-ai-engine-inference-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.ai.sakura.ad.jp security: - BearerAuth: [] tags: - name: Messages paths: /v1/messages: post: summary: Create a message operationId: createMessage description: 'Anthropic互換のMessages APIエンドポイントです。 利用するモデルによってはサポートされていないパラメータもありますので、ご注意ください。' requestBody: required: true content: application/json: schema: type: object required: - model - messages - max_tokens properties: model: type: string description: 使用するモデル名 messages: type: array description: 会話を構成するメッセージオブジェクトのリスト minItems: 1 items: type: object required: - role - content properties: role: type: string description: メッセージの役割 enum: - user - assistant content: description: メッセージの内容(文字列またはコンテンツブロックの配列) oneOf: - type: string - type: array items: type: object properties: type: type: string enum: - text - image text: type: string source: type: object properties: type: type: string enum: - base64 - url media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp data: type: string url: type: string max_tokens: type: integer description: 生成する最大トークン数 system: type: string description: システムプロンプト stream: type: boolean description: ストリーミング応答を有効にするかどうか default: false temperature: type: number description: 生成の多様性を制御するパラメータ。値が高いほど多様な応答が生成され、値が低いほど決定的な応答が生成されます。 minimum: 0 maximum: 1 top_p: type: number description: Nucleus sampling の確率質量 minimum: 0 maximum: 1 top_k: type: integer description: Top-k サンプリングのパラメータ stop_sequences: type: array description: 生成を停止すべきシーケンスのリスト items: type: string tools: type: array description: モデルが呼び出し可能なツールのリスト items: type: object properties: name: type: string description: ツールの名前 description: type: string description: ツールの説明 input_schema: type: object description: ツールの入力スキーマ tool_choice: description: モデルがツールを使用する方法の制御 oneOf: - type: object properties: type: type: string enum: - auto - any - none disable_parallel_tool_use: type: boolean - type: object properties: type: type: string enum: - tool name: type: string disable_parallel_tool_use: type: boolean metadata: type: object description: リクエストに添付するオプションのキーバリューペア properties: user_id: type: string description: エンドユーザーを表す識別子 chat_template_kwargs: type: object description: 'モデルへの追加パラメータを指定するためのオブジェクト。 例えば `{"enable_thinking": true}` のように指定することで、Reasoning/Thinking 出力の ON/OFF を制御できます。 その他、モデル固有のパラメータも指定可能です。 ' additionalProperties: true responses: '200': description: Success '400': description: Bad request '401': description: Unauthorized '429': description: Rate limited '500': description: Server error '504': description: Server error tags: - Messages servers: - url: https://api.ai.sakura.ad.jp components: securitySchemes: BearerAuth: type: http scheme: bearer x-refined-from: - ai-engine-inference-api.yaml - sakura-internet-ai-engine-inference-openapi.yml