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

# Retrieve a message

> Returns the current status of a queued message. Completed responses include the Anthropic message fields. Use this operation with the X-Sail-Message-Id returned after a non-streaming timeout.



## OpenAPI

````yaml /openapi.json get /messages/{messageID}
openapi: 3.1.0
info:
  title: Sail API
  version: '2026-02-18'
  description: >-
    Sail provides OpenAI-compatible Responses and Chat Completions endpoints,
    plus an Anthropic-compatible Messages endpoint. This reference documents the
    currently supported subset of fields.
servers:
  - url: https://api.sailresearch.com/v1
security:
  - BearerAuth: []
tags:
  - name: Models API
    description: Model discovery endpoints.
  - name: Responses API
    description: OpenAI-compatible Responses API endpoints.
  - name: Chat Completions API
    description: OpenAI-compatible Chat Completions API endpoints.
  - name: Messages API
    description: Anthropic-compatible Messages API endpoints.
  - name: Batches API
    description: Submit and manage batches of requests.
paths:
  /messages/{messageID}:
    get:
      tags:
        - Messages API
      summary: Retrieve a message
      description: >-
        Returns the current status of a queued message. Completed responses
        include the Anthropic message fields. Use this operation with the
        X-Sail-Message-Id returned after a non-streaming timeout.
      operationId: getMessage
      parameters:
        - name: messageID
          in: path
          required: true
          description: Message ID returned by POST /v1/messages or X-Sail-Message-Id.
          schema:
            type: string
      responses:
        '200':
          description: Current message status or completed message output.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicMessageStatus'
        '400':
          description: Invalid message ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
        '401':
          description: Authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
        '404':
          description: Message not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicErrorResponse'
      security:
        - BearerAuth: []
        - AnthropicApiKey: []
components:
  schemas:
    AnthropicMessageStatus:
      type: object
      required:
        - id
        - type
        - status
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - message
        status:
          type: string
          enum:
            - queued
            - in_progress
            - completed
            - failed
            - cancelled
        role:
          type: string
          enum:
            - assistant
        content:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/AnthropicTextBlock'
              - $ref: '#/components/schemas/AnthropicToolUseBlock'
              - $ref: '#/components/schemas/AnthropicThinkingBlock'
        model:
          type: string
        stop_reason:
          type: string
          enum:
            - end_turn
            - max_tokens
            - tool_use
            - stop_sequence
            - refusal
            - model_context_window_exceeded
        stop_sequence:
          oneOf:
            - type: string
            - type: 'null'
        usage:
          $ref: '#/components/schemas/AnthropicUsage'
        error:
          $ref: '#/components/schemas/MessageStatusError'
      additionalProperties: false
    AnthropicErrorResponse:
      type: object
      required:
        - type
        - error
        - request_id
      properties:
        type:
          type: string
          enum:
            - error
        error:
          $ref: '#/components/schemas/AnthropicErrorObject'
        request_id:
          type: string
          description: Unique identifier for this request.
      additionalProperties: false
    AnthropicTextBlock:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
        cache_control:
          $ref: '#/components/schemas/AnthropicCacheControl'
      additionalProperties: false
    AnthropicToolUseBlock:
      type: object
      description: >-
        Tool call emitted by the model. Return its outcome as a tool_result
        block in a follow-up user message.
      required:
        - type
        - id
        - name
        - input
      properties:
        type:
          type: string
          enum:
            - tool_use
        id:
          type: string
        name:
          type: string
        input:
          type: object
          additionalProperties: true
        cache_control:
          $ref: '#/components/schemas/AnthropicCacheControl'
      additionalProperties: false
    AnthropicThinkingBlock:
      type: object
      description: >-
        Extended-thinking reasoning block. The reasoning text is forwarded; an
        opaque signature is accepted but is not verified or forwarded.
      required:
        - type
        - thinking
      properties:
        type:
          type: string
          enum:
            - thinking
        thinking:
          type: string
        signature:
          type: string
          description: >-
            Opaque signature accepted for compatibility but not verified or
            forwarded.
        cache_control:
          $ref: '#/components/schemas/AnthropicCacheControl'
      additionalProperties: false
    AnthropicUsage:
      type: object
      required:
        - input_tokens
        - output_tokens
      properties:
        input_tokens:
          type: integer
        output_tokens:
          type: integer
      additionalProperties: false
    MessageStatusError:
      type: object
      required:
        - type
        - code
        - message
      properties:
        type:
          type: string
          enum:
            - invalid_request_error
            - server_error
        code:
          type: 'null'
        message:
          type: string
      additionalProperties: false
    AnthropicErrorObject:
      type: object
      required:
        - type
        - message
      properties:
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - billing_error
            - permission_error
            - not_found_error
            - conflict_error
            - request_too_large
            - rate_limit_error
            - timeout_error
            - overloaded_error
            - api_error
        message:
          type: string
      additionalProperties: false
    AnthropicCacheControl:
      type: object
      description: >-
        Prompt-cache hint (e.g. { "type": "ephemeral" }). Accepted on content
        blocks for Anthropic SDK compatibility but ignored — no cache
        read/write; see the Prompt caching note.
      properties:
        type:
          type: string
          enum:
            - ephemeral
      additionalProperties: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
    AnthropicApiKey:
      type: apiKey
      in: header
      name: x-api-key

````