> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Lana メッセージを作成する

> Solana AI エージェントの Lana に質問し、イベントのストリームまたは単一の JSON レスポンスとして回答を取得します。

各リクエストには、`lana-thinking` の場合は **10,000 クレジット**、`lana-fast` の場合は **2,000 クレジット**が必要です。

有料プランが必要です。無料プランのリクエストでは `403 Forbidden` が返されます。

クイックスタート、ストリーミングイベント、エラー処理については、[Lana API ガイド](https://www.helius.dev/docs/ja/lana.md)を参照してください。

## リクエストパラメータ

**model** `string` *required*

複数ステップの分析には `lana-thinking` を使用します。1 ターンあたり最大 20 回の検索ステップを実行でき、推論をストリーミングできます。簡単な検索や単一の事実の確認には `lana-fast` を使用します。1 ターンあたり最大 4 回の検索ステップを実行できます。

* `lana-thinking`
* `lana-fast`

**messages** `array` *required*

古いものから順に並べた会話です。少なくとも 1 件のメッセージが必要で、最後のメッセージには `role` `user` が必要です。API は会話を保存しないため、リクエストのたびに会話全体を送信してください。

**messages\[].role** `string` *required*

メッセージの作成者です。

* `user`
* `assistant`

**messages\[].content** `any` *required*

空でない文字列、または空でないコンテンツブロックの配列です。`text` は両方のロールで使用できます。`image` と `tool_result` は `user` メッセージでのみ、`tool_use` は `assistant` メッセージでのみ使用できます。

**max\_tokens** `number` (default: 8192)

1 回のモデルステップで Lana が出力できるトークンの最大数です。検索を伴うターンでは複数のステップが実行されるため、ターン全体の `output_tokens` はこれより多くなる場合があります。2,048 未満では、`lana-thinking` は推論を行いません。

**stream** `boolean` (default: false)

`true` はサーバー送信イベントをストリーミングします。`false` はターンの終了時に 1 つの JSON オブジェクトを返します。

**system** `string`

「3 つの箇条書きで回答してください。」などの追加指示です。これらは Lana 独自の指示に追加されるものであり、その代わりに使用されるものではありません。

**extensions** `object`

Lana 専用のオプションです。すべて任意です。`include_*` オプションを指定すると出力が可能になりますが、送信するかどうかは Lana が判断します。

**extensions.read\_only** `boolean` (default: true)

送金、スワップ、トークンローンチのツールを削除します。`true` のままにしてください。

**extensions.output\_format** `string` (default: markdown)

`plain` を指定すると、Lana は Markdown を使用せず、`{{cite:N}}` マーカーも削除します。`source` イベントは引き続き受信されます。

* `markdown`
* `plain`

**extensions.include\_ui\_schema** `boolean` (default: false)

`ui_block` および `ui_schema` イベントとして UI コンポーネントを送信できるようにします。

**extensions.include\_followups** `boolean` (default: false)

提案されるフォローアップ質問を最大 3 件まで送信できるようにします。

**extensions.include\_documents** `boolean` (default: false)

ダウンロード可能な CSV、JSON、またはテキストファイルを `document` イベントとして送信できるようにします。

**extensions.enable\_deep\_scan** `boolean` (default: false)

Lana がアドレスの履歴から最大 10,000 件のトランザクション（件数と合計値の場合は 50,000 件）を読み取れるようにします。1 ターンあたり最大 3 回スキャンできます。メインネットでのみ使用できます。これを指定しない場合、Lana は 1 回の検索につき最大 100 件のトランザクションを読み取ります。料金は同じ固定価格です。

**extensions.user\_context** `object`

質問者の情報です。

**extensions.user\_context.wallet** `string`

ユーザーのアドレスです。これにより、「私のウォレット」や「私の残高」を使用できます。

**extensions.user\_context.address\_kind** `string`

`wallet` または `token`：`wallet` が何であるかを指定します。`wallet` が必要です。

**extensions.user\_context.time\_zone** `string`

`America/New_York` などの IANA タイムゾーンです。これにより、「今日」を使用できます。

**extensions.user\_context.network** `string` (default: mainnet)

検索対象のネットワークです。

* `mainnet`
* `devnet`

**extensions.attachments** `array`

最後のユーザーメッセージに追加する画像です。最大 8 枚まで指定できます。`messages` 内の `image` ブロックは、この上限にはカウントされません。

**extensions.attachments\[].url** `string` *required*

画像の URL です。

**extensions.attachments\[].kind** `string` *required*

常に `image` です。

* `image`

**extensions.progress\_context** `object`

Orb エクスプローラーで使用されます。指定する必要はありません。

**extensions.transaction\_filter\_context** `object`

Orb エクスプローラーで使用されます。指定する必要はありません。


## OpenAPI

````yaml ja/openapi/lana/openapi.yaml POST /v1/lana/messages
openapi: 3.0.3
info:
  title: Lana API
  description: |
    Lana は、HTTP 経由で呼び出す Solana AI エージェントです。平易な英語で質問を送信すると、Lana が
    ウォレット、トークン、トランザクション、価格を検索して回答します。API は Anthropic
    Messages API と同様の形式ですが、Anthropic SDK は使用できません。

    ## 認証

    Helius API キーを次のいずれかの方法で送信します。
    - ヘッダー（推奨）: `X-Api-Key: YOUR_API_KEY`
    - クエリパラメータ: `?api-key=YOUR_API_KEY`

    このエンドポイントでは `Authorization: Bearer` は機能せず、`401` が返されます。
  version: 1.0.0
  contact:
    name: API サポート
    url: https://helius.dev
servers:
  - url: https://beta.helius-rpc.com
    description: Gatekeeper（ベータ）
security:
  - ApiKeyHeader: []
  - ApiKeyQuery: []
tags:
  - name: メッセージ
    description: Lana に質問します
paths:
  /v1/lana/messages:
    post:
      tags:
        - メッセージ
      summary: Lana メッセージを作成
      description: |
        会話を Lana に送信し、その回答を返します。`"stream": true` の場合、回答は
        サーバー送信イベント（`text/event-stream`）として届きます。`"stream": false`（デフォルト）の場合、
        ターンの終了時に 1 つの JSON オブジェクトとして届きます。

        `"stream": true` の場合、Lana が最初に応答した時点、または遅くとも
        10 秒後に `200` と最初のイベントが届き、その後は 10 秒ごとに `ping` イベントが届きます。
        HTTP クライアントの読み取りタイムアウトは 30 秒以上に設定してください。`httpx` のような
        デフォルトの 5 秒では短すぎます。レスポンス開始前に失敗したリクエストには、該当するステータスの
        通常のエラーレスポンスが返されるため、本文をストリームとして読み取る前に HTTP ステータスを確認してください。
        レスポンス開始後に失敗した場合は、最後の `error` イベントとして届きます。

        各リクエストの料金は、`lana-thinking` では一律 10,000 クレジット、
        `lana-fast` では 2,000 クレジットです。HTTP `200` を受け取ったすべてのリクエストは、
        ターンがどのように終了しても課金されます。レスポンス開始前に失敗したリクエストには別のステータスが返され、
        課金されません。有料プランでのみ利用できます。
      operationId: createLanaMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessagesRequest'
            examples:
              nonStreaming:
                summary: 非ストリーミング
                value:
                  model: lana-thinking
                  messages:
                    - role: user
                      content: 現在の SOL の価格はいくらですか？
                  extensions:
                    read_only: true
              streaming:
                summary: ストリーミング
                value:
                  model: lana-thinking
                  stream: true
                  messages:
                    - role: user
                      content: >-
                        EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                        の最大保有者は誰ですか？
                  extensions:
                    read_only: true
      responses:
        '200':
          description: >
            ターンが実行されました。`"stream": false` の場合は 1 つの JSON オブジェクトです。`stop_reason`
            を確認してください。

            コンテンツの生成後に失敗したターンでも `200` が返され、`stop_reason: "error"` と

            `error` オブジェクトが含まれます。


            `"stream": true` の場合は、サーバー送信イベントのストリームです。各イベントは

            `event: <type>` 行と `data: <json>` 行で構成され、その後に空行が続きます。ストリームは

            `message_start` で始まり、必ず `message_end` または `error` で終了します。新しいイベントの

            種類やフィールドが追加される可能性があります。認識できないものは無視してください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/StreamEvent'
              example: >
                event: message_start

                data:
                {"type":"message_start","message":{"id":"msg_3f9c...","model":"lana-thinking"}}


                event: tool_use

                data:
                {"type":"tool_use","tool_use_id":"toolu_01...","name":"...","input":{"mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}


                event: tool_result

                data:
                {"type":"tool_result","tool_use_id":"toolu_01...","content":"{\"holders\":[..."}


                event: content_block_delta

                data:
                {"type":"content_block_delta","delta":{"type":"text_delta","text":"USDC
                の最大保有者は"}}


                event: message_end

                data:
                {"type":"message_end","stop_reason":"end_turn","usage":{"input_tokens":91200,"output_tokens":212,"tool_calls":1,"prompt_tokens":46100,"context_window":200000}}
        '400':
          description: |
            本文が無効です。たとえば、不明なモデルやフィールドがある場合、または `max_tokens` が
            8,192 を超えている場合です。`message` には無効な各フィールドの名前が示されます。課金されません。

            10 MB を超える本文は、Gatekeeper によってプレーンテキストの `Bad Request` 本文とともに拒否されます。

            会話がコンテキストウィンドウに収まらないため、レスポンス開始前にターンが失敗した場合も、
            `error.type` が `context_overflow` の `400` が返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  type: invalid_request_error
                  message: 'max_tokens: max_tokens must be <= 8192'
            text/plain:
              schema:
                type: string
              example: Bad Request
        '401':
          description: >
            API キーがないか無効、または `Authorization: Bearer`
            として送信されています。本文はプレーンテキストです。課金されません。
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: >-
            ご利用のプランに Lana が含まれていない（Free
            プラン）か、キーのアクセス設定によってブロックされています。本文はプレーンテキストです。課金されません。
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: >
            課金されません。次のいずれかです。

            - プレーンテキストの `Too Many Requests`: プランのレート制限を超えています。`Retry-After`（1
            秒）後に再試行してください。

            - プレーンテキストの `max usage reached`: プロジェクトのクレジットが不足しています。`Retry-After`
            はありません。クレジットを追加するかアップグレードするまで、再試行しても失敗します。

            - `error.type` が `rate_limit_error` の JSON: プロジェクトですでに約 3 件の Lana
            リクエストが実行されています。`Retry-After`（5 秒）後に再試行してください。
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            text/plain:
              schema:
                type: string
              example: Too Many Requests
        '500':
          description: レスポンス開始前に `api_error` でターンが失敗しました。課金されません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: レスポンス開始前に `tool_error` でターンが失敗しました。課金されません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Lana が処理上限に達しているか、再起動中です。`Retry-After`（処理上限時は 5 秒、再起動中は 30
            秒）後に再試行してください。課金されません。
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: レスポンス開始前に `timeout_error` でターンが失敗しました。課金されません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '529':
          description: >-
            レスポンス開始前に `overloaded_error` でターンが失敗しました。一部の HTTP クライアントは `529`
            を認識しないため、`503` と同様に処理してください。課金されません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    MessagesRequest:
      type: object
      additionalProperties: false
      required:
        - model
        - messages
      properties:
        model:
          type: string
          enum:
            - lana-thinking
            - lana-fast
          description: >-
            複数ステップの分析には `lana-thinking` を使用します。ターンごとに最大 20
            回の検索ステップを実行でき、推論をストリーミングできます。簡単な検索や単一の事実には `lana-fast`
            を使用します。ターンごとに最大 4 回の検索ステップを実行できます。
          example: lana-thinking
        messages:
          type: array
          minItems: 1
          description: >-
            古い順に並べた会話です。少なくとも 1 件のメッセージが必要で、最後のメッセージの `role` は `user`
            でなければなりません。API は会話を保存しないため、リクエストごとに会話全体を送信してください。
          items:
            $ref: '#/components/schemas/Message'
        max_tokens:
          type: integer
          minimum: 1
          maximum: 8192
          default: 8192
          description: >-
            1 回のモデルステップで Lana が生成できる出力トークンの最大数です。検索を伴うターンは複数のステップを実行するため、ターン全体の
            `output_tokens` はこれを上回る場合があります。2,048 未満では、`lana-thinking` は推論しません。
        stream:
          type: boolean
          default: false
          description: >-
            `true` の場合、サーバー送信イベントをストリーミングします。`false` の場合、ターンの終了時に 1 つの JSON
            オブジェクトを返します。
        system:
          type: string
          minLength: 1
          maxLength: 10000
          description: 「3 つの箇条書きで回答してください。」などの追加指示です。Lana 独自の指示を置き換えるのではなく、それらに追加されます。
        extensions:
          $ref: '#/components/schemas/Extensions'
    MessageResponse:
      type: object
      description: 非ストリーミングレスポンスです。回答は `text` ブロックを順番に連結したものです。
      required:
        - id
        - type
        - role
        - model
        - content
        - stop_reason
        - usage
      properties:
        id:
          type: string
          example: msg_3f9c...
        type:
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - assistant
        model:
          type: string
          enum:
            - lana-thinking
            - lana-fast
        content:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TextBlock'
              - $ref: '#/components/schemas/ToolUseBlock'
              - $ref: '#/components/schemas/ToolResultBlock'
        stop_reason:
          $ref: '#/components/schemas/StopReason'
        usage:
          $ref: '#/components/schemas/Usage'
        ui_schema:
          type: object
          description: >-
            すべての UI コンポーネントを 1 つのツリーとして表します。`include_ui_schema`
            が有効で、表示するものがある場合に存在します。
        documents:
          type: array
          description: '`include_documents` が有効で、Lana がファイルを作成した場合に存在します。'
          items:
            $ref: '#/components/schemas/Document'
        follow_up:
          type: array
          description: '`include_followups` が有効で、Lana が質問を提案した場合に存在します。'
          items:
            type: string
        sources:
          type: array
          description: Lana がウェブページを使用した場合に存在します。
          items:
            $ref: '#/components/schemas/Source'
        error:
          $ref: '#/components/schemas/ErrorObject'
      example:
        id: msg_3f9c...
        type: message
        role: assistant
        model: lana-thinking
        content:
          - type: tool_use
            id: toolu_01...
            name: ...
            input:
              mint: So11111111111111111111111111111111111111112
          - type: tool_result
            tool_use_id: toolu_01...
            content: '{"price":...'
          - type: text
            text: SOL は ... で取引されています
        stop_reason: end_turn
        usage:
          input_tokens: 90800
          output_tokens: 96
          tool_calls: 1
          prompt_tokens: 45600
          context_window: 200000
    StreamEvent:
      description: >
        1 件のサーバー送信イベントです。`data` JSON の `type` は `event` 名と一致します。順序は次のとおりです。

        1. `message_start`。常に最初です。

        2.
        `content_block_delta`、`tool_use`、`tool_result`、`source`、`ui_block`、`document`、`progress_update`、`ping`
        の任意の組み合わせです。

        3. `ui_schema`。最大 1 回です。

        4. `follow_up`。最大 1 回です。

        5. ターンが完了した場合は `message_end`、失敗した場合は `error` です。常に最後です。
      oneOf:
        - $ref: '#/components/schemas/MessageStartEvent'
        - $ref: '#/components/schemas/ContentBlockDeltaEvent'
        - $ref: '#/components/schemas/ToolUseEvent'
        - $ref: '#/components/schemas/ToolResultEvent'
        - $ref: '#/components/schemas/SourceEvent'
        - $ref: '#/components/schemas/ProgressUpdateEvent'
        - $ref: '#/components/schemas/UiBlockEvent'
        - $ref: '#/components/schemas/DocumentEvent'
        - $ref: '#/components/schemas/UiSchemaEvent'
        - $ref: '#/components/schemas/FollowUpEvent'
        - $ref: '#/components/schemas/MessageEndEvent'
        - $ref: '#/components/schemas/ErrorEvent'
        - $ref: '#/components/schemas/PingEvent'
    ErrorResponse:
      type: object
      required:
        - type
        - error
      properties:
        type:
          type: string
          enum:
            - error
        error:
          $ref: '#/components/schemas/ErrorObject'
    Message:
      type: object
      additionalProperties: false
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
          description: メッセージの作成者です。
        content:
          description: >-
            空でない文字列、または空でないコンテンツブロックの配列です。`text` は両方のロールで使用でき、`image` と
            `tool_result` は `user` メッセージのみ、`tool_use` は `assistant`
            メッセージのみで使用できます。
          oneOf:
            - type: string
              minLength: 1
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/ContentBlock'
    Extensions:
      type: object
      additionalProperties: false
      description: >-
        Lana 専用のオプションです。すべて任意です。`include_*` オプションは出力を可能にしますが、送信するかどうかは Lana
        が判断します。
      properties:
        read_only:
          type: boolean
          default: true
          description: 送金、スワップ、トークン発行ツールを削除します。`true` のままにしてください。
        output_format:
          type: string
          enum:
            - markdown
            - plain
          default: markdown
          description: >-
            `plain` は、Markdown を使用せず、`{{cite:N}}` マーカーを削除するよう Lana
            に指示します。`source` イベントは引き続き届きます。
        include_ui_schema:
          type: boolean
          default: false
          description: '`ui_block` および `ui_schema` イベントとして UI コンポーネントを許可します。'
        include_followups:
          type: boolean
          default: false
          description: 最大 3 件のフォローアップ質問候補を許可します。
        include_documents:
          type: boolean
          default: false
          description: '`document` イベントとして、ダウンロード可能な CSV、JSON、またはテキストファイルを許可します。'
        enable_deep_scan:
          type: boolean
          default: false
          description: >-
            Lana がアドレス履歴の最大 10,000 件のトランザクション（件数と合計については 50,000
            件）を読み取れるようにします。ターンごとに最大 3 回スキャンできます。Mainnet
            でのみ利用できます。これを使用しない場合、Lana は検索ごとに最大 100
            件のトランザクションを読み取ります。料金は同じ一律価格です。
        user_context:
          $ref: '#/components/schemas/UserContext'
        attachments:
          type: array
          maxItems: 8
          description: 最後のユーザーメッセージに追加する最大 8 枚の画像です。`messages` 内の `image` ブロックはこの上限に含まれません。
          items:
            $ref: '#/components/schemas/Attachment'
        progress_context:
          type: object
          description: Orb エクスプローラーで使用されます。指定する必要はありません。
        transaction_filter_context:
          type: object
          description: Orb エクスプローラーで使用されます。指定する必要はありません。
    TextBlock:
      type: object
      additionalProperties: false
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
          minLength: 1
    ToolUseBlock:
      type: object
      additionalProperties: false
      description: 以前のターンから、Lana が返した形式のまま再現された検索です。`assistant` メッセージでのみ使用できます。
      required:
        - type
        - id
        - name
        - input
      properties:
        type:
          type: string
          enum:
            - tool_use
        id:
          type: string
        name:
          type: string
        input:
          type: object
          additionalProperties: true
    ToolResultBlock:
      type: object
      additionalProperties: false
      description: 再現された検索の結果です。`user` メッセージでのみ使用できます。
      required:
        - type
        - tool_use_id
        - content
      properties:
        type:
          type: string
          enum:
            - tool_result
        tool_use_id:
          type: string
        content:
          type: string
        is_error:
          type: boolean
    StopReason:
      type: string
      enum:
        - end_turn
        - max_tokens
        - tool_use
        - error
      description: |
        - `end_turn`: Lana が回答を完了しました。
        - `max_tokens`: 回答が `max_tokens` に達し、途中で切れている可能性があります。
        - `tool_use`: ターンが検索ステップで終了しました。通常はステップ上限に達したためです。
        - `error`: ターンが失敗しました。回答は不完全です。
    Usage:
      type: object
      required:
        - input_tokens
        - output_tokens
        - tool_calls
        - prompt_tokens
      properties:
        input_tokens:
          type: integer
          description: ターン全体の入力トークン数です。
        output_tokens:
          type: integer
          description: ターン全体の出力トークン数です。
        tool_calls:
          type: integer
          description: ターン中に実行された検索数です。`tool_use` として表示されないものも含まれます。
        prompt_tokens:
          type: integer
          description: 最後のモデルステップでの入力トークン数です。コンテキストの使用量を確認するために使用します。
        context_window:
          type: integer
          description: モデルのコンテキストウィンドウです。現在は `200000` です。
    Document:
      type: object
      required:
        - filename
        - format
        - content
      properties:
        tool_use_id:
          type: string
        filename:
          type: string
        format:
          type: string
          enum:
            - csv
            - json
            - txt
        content:
          type: string
        description:
          type: string
    Source:
      type: object
      required:
        - index
        - url
        - title
      properties:
        index:
          type: integer
          description: 回答内の `{{cite:N}}` マーカーに対応します。
        url:
          type: string
        title:
          type: string
        snippet:
          type: string
    ErrorObject:
      type: object
      required:
        - type
        - message
      properties:
        type:
          type: string
          description: >
            `message` ではなく、この値で分岐してください。既知の値は
            `invalid_request_error`、`context_overflow`、

            `overloaded_error`、`timeout_error`、`tool_error`、`rate_limit_error`、`api_error`
            です。

            その他の値は `api_error` と同様に扱ってください。
          example: invalid_request_error
        message:
          type: string
    MessageStartEvent:
      type: object
      title: message_start
      description: ターンが開始されました。
      required:
        - type
        - message
      properties:
        type:
          type: string
          enum:
            - message_start
        message:
          type: object
          required:
            - id
            - model
          properties:
            id:
              type: string
            model:
              type: string
              enum:
                - lana-thinking
                - lana-fast
    ContentBlockDeltaEvent:
      type: object
      title: content_block_delta
      description: >-
        回答のチャンク（`text_delta`）、または Lana の推論のチャンク（`thinking_delta`。`lana-thinking`
        で Lana が推論する場合のみ）です。推論は回答とは別に表示するか、スキップしてください。
      required:
        - type
        - delta
      properties:
        type:
          type: string
          enum:
            - content_block_delta
        delta:
          oneOf:
            - type: object
              title: text_delta
              required:
                - type
                - text
              properties:
                type:
                  type: string
                  enum:
                    - text_delta
                text:
                  type: string
            - type: object
              title: thinking_delta
              required:
                - type
                - thinking
              properties:
                type:
                  type: string
                  enum:
                    - thinking_delta
                thinking:
                  type: string
    ToolUseEvent:
      type: object
      title: tool_use
      description: Lana が検索を開始しました。進行状況インジケーターにのみ使用してください。ツール名と入力は変更される可能性があります。
      required:
        - type
        - tool_use_id
        - name
        - input
      properties:
        type:
          type: string
          enum:
            - tool_use
        tool_use_id:
          type: string
        name:
          type: string
        input:
          type: object
          additionalProperties: true
    ToolResultEvent:
      type: object
      title: tool_result
      description: 検索が完了しました。検索が失敗してもターンは失敗せず、Lana が別の方法で対応します。
      required:
        - type
        - tool_use_id
        - content
      properties:
        type:
          type: string
          enum:
            - tool_result
        tool_use_id:
          type: string
        content:
          type: string
          description: >-
            最大 500 文字のプレビューです。`is_error` が `true` の場合は、`error` メッセージと `code` を含む
            JSON です。
        is_error:
          type: boolean
    SourceEvent:
      type: object
      title: source
      description: Lana が使用したウェブページです。
      required:
        - type
        - index
        - url
        - title
      properties:
        type:
          type: string
          enum:
            - source
        index:
          type: integer
          description: 回答内の `{{cite:N}}` マーカーに対応します。
        url:
          type: string
        title:
          type: string
        snippet:
          type: string
    ProgressUpdateEvent:
      type: object
      title: progress_update
      description: 長いターンの途中で送信される短いステータス行です。回答とは別に表示してください。
      required:
        - type
        - id
        - message
        - created_at
      properties:
        type:
          type: string
          enum:
            - progress_update
        id:
          type: string
        message:
          type: string
        created_at:
          type: integer
          description: Unix ミリ秒です。
    UiBlockEvent:
      type: object
      title: ui_block
      description: 1 つの UI コンポーネントです。`include_ui_schema` が必要です。
      required:
        - type
        - component
        - schema
      properties:
        type:
          type: string
          enum:
            - ui_block
        tool_use_id:
          type: string
        component:
          type: string
        schema:
          type: object
    DocumentEvent:
      type: object
      title: document
      description: ダウンロード可能なファイルです。`include_documents` が必要です。
      required:
        - type
        - filename
        - format
        - content
      properties:
        type:
          type: string
          enum:
            - document
        tool_use_id:
          type: string
        filename:
          type: string
        format:
          type: string
          enum:
            - csv
            - json
            - txt
        content:
          type: string
        description:
          type: string
    UiSchemaEvent:
      type: object
      title: ui_schema
      description: すべての UI コンポーネントを 1 つのツリーとして表します。`include_ui_schema` が必要です。最大 1 回です。
      required:
        - type
        - schema
      properties:
        type:
          type: string
          enum:
            - ui_schema
        schema:
          type: object
    FollowUpEvent:
      type: object
      title: follow_up
      description: 次の質問候補です。`include_followups` が必要です。最大 1 回です。
      required:
        - type
        - suggestions
      properties:
        type:
          type: string
          enum:
            - follow_up
        suggestions:
          type: array
          items:
            type: string
    MessageEndEvent:
      type: object
      title: message_end
      description: >-
        ターンが完了しました。`stop_reason` が `error` の場合は `api_error`
        と同様に扱ってください。それより前の回答テキストは不完全です。
      required:
        - type
        - stop_reason
        - usage
      properties:
        type:
          type: string
          enum:
            - message_end
        stop_reason:
          $ref: '#/components/schemas/StopReason'
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorEvent:
      type: object
      title: error
      description: ストリーム開始後にターンが失敗しました。それより前の回答テキストは不完全です。
      required:
        - type
        - error
      properties:
        type:
          type: string
          enum:
            - error
        error:
          $ref: '#/components/schemas/ErrorObject'
    PingEvent:
      type: object
      title: ping
      description: 10 秒ごとのハートビートです。無視してください。
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - ping
    ContentBlock:
      oneOf:
        - $ref: '#/components/schemas/TextBlock'
        - $ref: '#/components/schemas/ImageBlock'
        - $ref: '#/components/schemas/ToolUseBlock'
        - $ref: '#/components/schemas/ToolResultBlock'
    UserContext:
      type: object
      additionalProperties: false
      description: 質問者に関する情報です。
      properties:
        wallet:
          type: string
          minLength: 1
          maxLength: 128
          description: ユーザーのアドレスです。これにより「自分のウォレット」や「自分の残高」が機能します。
        address_kind:
          type: string
          minLength: 1
          maxLength: 32
          description: '`wallet` または `token` で、`wallet` が何を指すかを示します。`wallet` が必要です。'
        time_zone:
          type: string
          minLength: 1
          maxLength: 64
          description: '`America/New_York` などの IANA タイムゾーンです。これにより「今日」が機能します。'
        network:
          type: string
          enum:
            - mainnet
            - devnet
          default: mainnet
          description: 検索対象のネットワークです。
    Attachment:
      type: object
      additionalProperties: false
      required:
        - url
        - kind
      properties:
        url:
          type: string
          format: uri
          description: 画像の URL です。
        kind:
          type: string
          enum:
            - image
          description: 常に `image` です。
    ImageBlock:
      type: object
      additionalProperties: false
      description: URL で指定する画像です。`user` メッセージでのみ使用できます。Base64 画像はサポートされていません。
      required:
        - type
        - source
      properties:
        type:
          type: string
          enum:
            - image
        source:
          type: object
          additionalProperties: false
          required:
            - type
            - url
          properties:
            type:
              type: string
              enum:
                - url
            url:
              type: string
              format: uri
  headers:
    RetryAfter:
      description: 再試行するまで待機する秒数です。
      schema:
        type: integer
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Helius API キーです。
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: Helius API キーです。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.