FriendliAI Container.Messages API

The Container.Messages API from FriendliAI — 2 operation(s) for container.messages.

Operations 2

POST /v1/messages Messages #
POST /v1/messages#stream Stream messages #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/friendliai-container-messages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

friendliai-container-messages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Friendli Suite API Reference Container.Audio Container.Messages API
  description: This is an OpenAPI reference of Friendli Suite API.
  termsOfService: https://friendli.ai/terms-of-service
  contact:
    name: FriendliAI Support Team
    email: support@friendli.ai
  version: 0.1.0
servers:
- url: https://api.friendli.ai
tags:
- name: Container.Messages
paths:
  /v1/messages:
    servers:
    - url: http://localhost:8000
    post:
      tags:
      - Container.Messages
      summary: Messages
      description: Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.
      operationId: containerMessages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerMessagesBody'
        required: true
      responses:
        '200':
          description: Successfully generated a Messages-style response. For streaming (`text/event-stream`) event and chunk details, see [Messages chunk object](/openapi/container/messages-chunk-object).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContainerMessagesSuccess'
              examples:
                Example:
                  value:
                    id: msg_4b71d12c86d94e719c7e3984a7bb7941
                    type: message
                    role: assistant
                    content:
                    - type: text
                      text: I can answer questions, generate text, and help with coding tasks.
                    stop_reason: end_turn
                    usage:
                      input_tokens: 17
                      output_tokens: 14
                      cache_read_input_tokens: 0
                    model: zai-org/GLM-5.2
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagesErrorResponse'
              examples:
                Invalid request error:
                  value:
                    type: error
                    error:
                      type: invalid_request_error
                      message: '...'
                    request_id: req_...
      x-speakeasy-name-override: messages
      x-mint:
        metadata:
          title: Container Messages
          sidebarTitle: Messages
          og:title: Container Messages
          description: Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.
          og:description: Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.
          tag: Beta
        href: /openapi/container/messages
        content: 'Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.


          When streaming mode is used (i.e., `stream` option is set to `true`), the response is in MIME type `text/event-stream`. Otherwise, the content type is `application/json`.

          You can view the schema of the streamed sequence of chunk objects in streaming mode [here](/openapi/container/messages-chunk-object).


          <Warning>Server-side tools are not supported in the Messages API. In `tools`, only custom/client function tools are used; non-`custom` tool types are ignored.</Warning>


          <Info>

          This API is currently in **Beta**.

          While we strive to provide a stable and reliable experience, this feature is still under active development.

          As a result, you may encounter unexpected behavior or limitations.

          We encourage you to provide feedback to help us improve the feature before its official release.


          - [Feature request & feedback](mailto:support@friendli.ai)

          - [Contact support](mailto:support@friendli.ai)


          </Info>'
  /v1/messages#stream:
    servers:
    - url: http://localhost:8000
    post:
      tags:
      - Container.Messages
      summary: Stream messages
      description: Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.
      operationId: containerMessagesStream
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerMessagesStreamBody'
        required: true
      responses:
        '200':
          description: Successfully generated a streamed Messages-style response.
          content:
            text/event-stream:
              examples:
                Example:
                  value: 'event: message_start

                    data: {"type":"message_start","message":{"id":"msg_4b71d12c86d94e719c7e3984a7bb7941","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":0,"output_tokens":0,"cache_read_input_tokens":0}}}


                    event: content_block_start

                    data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}


                    event: content_block_delta

                    data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}


                    event: content_block_delta

                    data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":", how can I help?"}}


                    event: content_block_stop

                    data: {"type":"content_block_stop","index":0}


                    event: message_delta

                    data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":11}}


                    event: message_stop

                    data: {"type":"message_stop"}

                    '
              schema:
                $ref: '#/components/schemas/ContainerMessagesStreamSuccess'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessagesErrorResponse'
              examples:
                Invalid request error:
                  value:
                    type: error
                    error:
                      type: invalid_request_error
                      message: '...'
                    request_id: req_...
      x-speakeasy-name-override: stream
      x-mint:
        metadata:
          title: Container Stream Messages
          sidebarTitle: Stream Messages
          og:title: Container Stream Messages
          description: Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.
          og:description: Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.
          tag: Beta
        href: /openapi/container/messages
        content: 'Generate a model response from a conversation using the Anthropic Messages API format. Supports streaming, function tool calls, and extended thinking.


          When streaming mode is used (i.e., `stream` option is set to `true`), the response is in MIME type `text/event-stream`. Otherwise, the content type is `application/json`.

          You can view the schema of the streamed sequence of chunk objects in streaming mode [here](/openapi/container/messages-chunk-object).


          <Warning>Server-side tools are not supported in the Messages API. In `tools`, only custom/client function tools are used; non-`custom` tool types are ignored.</Warning>


          <Info>

          This API is currently in **Beta**.

          While we strive to provide a stable and reliable experience, this feature is still under active development.

          As a result, you may encounter unexpected behavior or limitations.

          We encourage you to provide feedback to help us improve the feature before its official release.


          - [Feature request & feedback](mailto:support@friendli.ai)

          - [Contact support](mailto:support@friendli.ai)


          </Info>'
components:
  schemas:
    MessagesResponseContentBlock:
      oneOf:
      - $ref: '#/components/schemas/MessagesResponseThinkingBlock'
        title: Thinking
      - $ref: '#/components/schemas/MessagesResponseTextBlock'
        title: Text
      - $ref: '#/components/schemas/MessagesResponseToolUseBlock'
        title: Tool Use
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/MessagesResponseTextBlock'
          thinking: '#/components/schemas/MessagesResponseThinkingBlock'
          tool_use: '#/components/schemas/MessagesResponseToolUseBlock'
    MessagesStreamMessageStop:
      properties:
        type:
          type: string
          const: message_stop
          title: Type
          description: The type of the event.
      type: object
      required:
      - type
      title: MessagesStreamMessageStop
    MessagesOutputFormat:
      properties:
        type:
          anyOf:
          - type: string
            const: json_schema
          - type: 'null'
          title: Type
          description: Output format type. Set to `json_schema` to constrain output to a JSON schema.
        schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Schema
          description: JSON Schema object applied when `type` is `json_schema`.
      type: object
      title: MessagesOutputFormat
    MessagesToolResultBlock:
      properties:
        type:
          type: string
          const: tool_result
          title: Type
          description: Content block type. Must be `tool_result`.
        tool_use_id:
          type: string
          title: Tool Use Id
          description: Identifier of the related `tool_use` block this result answers.
        content:
          anyOf:
          - type: string
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Content
          description: Tool result payload. Can be plain text, a list of objects, or null when no body is returned.
      type: object
      required:
      - type
      - tool_use_id
      title: MessagesToolResultBlock
    MessagesErrorResponse:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Top-level response type for Messages API errors.
        error:
          $ref: '#/components/schemas/MessagesErrorObject'
          description: Structured error object.
        request_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Request Id
          description: Request identifier for debugging and support. It may be omitted in some failure paths.
      type: object
      required:
      - type
      - error
      title: MessagesErrorResponse
    MessagesErrorObject:
      properties:
        type:
          type: string
          title: Type
          description: Error category. For HTTP 422 in Messages API, this is `invalid_request_error`.
        message:
          type: string
          title: Message
          description: Human-readable error message.
      type: object
      required:
      - type
      - message
      title: MessagesErrorObject
    MessagesStreamThinkingDelta:
      properties:
        type:
          type: string
          const: thinking_delta
          title: Type
          description: Delta type.
        thinking:
          type: string
          title: Thinking
          description: Reasoning fragment when `type=thinking_delta`.
      type: object
      required:
      - type
      - thinking
      title: MessagesStreamThinkingDelta
    MessagesStreamStartTextBlock:
      properties:
        type:
          type: string
          const: text
          title: Type
          description: Content block type.
        text:
          type: string
          title: Text
          description: Text content when `type=text`.
      type: object
      required:
      - type
      - text
      title: MessagesStreamStartTextBlock
    MessagesStreamContentBlockStop:
      properties:
        type:
          type: string
          const: content_block_stop
          title: Type
          description: The type of the event.
        index:
          type: integer
          title: Index
          description: Index of the block that has finished streaming.
      type: object
      required:
      - type
      - index
      title: MessagesStreamContentBlockStop
    MessagesStreamTextDelta:
      properties:
        type:
          type: string
          const: text_delta
          title: Type
          description: Delta type.
        text:
          type: string
          title: Text
          description: Text fragment when `type=text_delta`.
      type: object
      required:
      - type
      - text
      title: MessagesStreamTextDelta
    MessagesTextBlock:
      properties:
        type:
          type: string
          const: text
          title: Type
          description: Content block type. Must be `text`.
        text:
          type: string
          title: Text
          description: Text content for this block.
      type: object
      required:
      - type
      - text
      title: MessagesTextBlock
    MessagesSystemTextBlock:
      properties:
        type:
          type: string
          const: text
          title: Type
          description: System block type. Must be `text`.
        text:
          type: string
          title: Text
          description: System instruction text content.
      type: object
      required:
      - type
      - text
      title: MessagesSystemTextBlock
    MessagesBase64ImageSource:
      properties:
        type:
          type: string
          const: base64
          title: Type
          description: Image source type. Must be `base64`.
        data:
          type: string
          minLength: 1
          title: Data
          description: Base64-encoded image bytes (without data URL prefix).
        media_type:
          type: string
          minLength: 1
          title: Media Type
          description: MIME type, for example `image/png`.
      type: object
      required:
      - type
      - data
      - media_type
      title: MessagesBase64ImageSource
    MessagesStreamMessageDeltaPayload:
      properties:
        stop_reason:
          anyOf:
          - type: string
            enum:
            - end_turn
            - max_tokens
            - tool_use
            - stop_sequence
          - type: 'null'
          title: Stop Reason
          description: Why generation stopped.
        stop_sequence:
          anyOf:
          - type: string
          - type: 'null'
          title: Stop Sequence
          description: Matched stop sequence when `stop_reason=stop_sequence`.
      type: object
      title: MessagesStreamMessageDeltaPayload
    MessagesStreamMessageDelta:
      properties:
        type:
          type: string
          const: message_delta
          title: Type
          description: The type of the event.
        delta:
          $ref: '#/components/schemas/MessagesStreamMessageDeltaPayload'
          description: Final message-level delta.
        usage:
          anyOf:
          - $ref: '#/components/schemas/MessagesStreamMessageDeltaUsage'
          - type: 'null'
          description: Usage delta object that may be emitted near stream completion.
      type: object
      required:
      - type
      - delta
      title: MessagesStreamMessageDelta
    MessagesImageBlock:
      properties:
        type:
          type: string
          const: image
          title: Type
          description: Content block type. Must be `image`.
        source:
          $ref: '#/components/schemas/MessagesImageSource'
          description: Image source descriptor (`url` or `base64`).
      type: object
      required:
      - type
      - source
      title: MessagesImageBlock
    MessagesStreamMessageDeltaUsage:
      properties:
        input_tokens:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Input Tokens
          description: Input token count delta when included.
        output_tokens:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Output Tokens
          description: Output token count delta when included.
        cache_read_input_tokens:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Cache Read Input Tokens
          description: Cached input token count delta when included.
      type: object
      title: MessagesStreamMessageDeltaUsage
    MessagesToolDefinition:
      properties:
        name:
          type: string
          title: Name
          description: Tool identifier used in model tool-call outputs. Keep this name stable and unique within the request.
        type:
          anyOf:
          - type: string
          - type: 'null'
          title: Type
          description: Tool category. If missing, empty, or `custom`, it is converted to a function tool. Any non-empty value other than `custom` is treated as a server-side tool and skipped.
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Natural-language description of what the tool does and when to call it.
        input_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Input Schema
          description: JSON Schema describing tool arguments. The model uses this schema to construct the tool input object.
        strict:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Strict
          description: If true, applies stricter schema adherence when generating tool arguments.
      type: object
      required:
      - name
      title: MessagesToolDefinition
    MessagesCompatibilityBlock:
      properties:
        type:
          type: string
          enum:
          - document
          - search_result
          - redacted_thinking
          - server_tool_use
          - web_search_tool_result
          - web_fetch_tool_result
          - code_execution_tool_result
          - bash_code_execution_tool_result
          - text_editor_code_execution_tool_result
          - tool_search_tool_result
          - container_upload
          title: Type
          description: Compatibility block type. These blocks are accepted for parsing compatibility and ignored for generation.
      type: object
      required:
      - type
      title: MessagesCompatibilityBlock
    MessagesStreamContentBlockStartPayload:
      oneOf:
      - $ref: '#/components/schemas/MessagesStreamStartTextBlock'
        title: Text
      - $ref: '#/components/schemas/MessagesStreamStartThinkingBlock'
        title: Thinking
      - $ref: '#/components/schemas/MessagesStreamStartToolUseBlock'
        title: Tool Use
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/MessagesStreamStartTextBlock'
          thinking: '#/components/schemas/MessagesStreamStartThinkingBlock'
          tool_use: '#/components/schemas/MessagesStreamStartToolUseBlock'
    ContainerMessagesBody:
      properties:
        messages:
          items:
            $ref: '#/components/schemas/MessagesInputMessage'
          type: array
          minItems: 1
          title: Messages
          description: A list of conversation messages ordered from oldest to newest. Must contain at least one item.
          examples:
          - - content: Explain top_p in one sentence.
              role: user
        max_tokens:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Max Tokens
          description: Maximum number of tokens to generate for the assistant response. Must be greater than 0 when provided.
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
          description: Routes the request to a specific adapter.
          examples:
          - (adapter-route)
        system:
          anyOf:
          - anyOf:
            - type: string
            - items:
                $ref: '#/components/schemas/MessagesSystemTextBlock'
              type: array
            description: Payload format for the top-level `system` instruction.
          - type: 'null'
          title: System
          description: Optional top-level system instruction applied before conversation turns. Supports a plain string or an array of text blocks.
        stream:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Stream
          description: Whether to stream the response. When set to `true`, events are sent as [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format) once generated.
          default: false
        temperature:
          anyOf:
          - type: number
          - type: 'null'
          title: Temperature
          description: Sampling temperature. Lower values make outputs more deterministic; higher values increase diversity.
        top_p:
          anyOf:
          - type: number
          - type: 'null'
          title: Top P
          description: Nucleus sampling parameter. The model samples from the smallest token set whose cumulative probability reaches `top_p`.
        top_k:
          anyOf:
          - type: integer
          - type: 'null'
          title: Top K
          description: Limits sampling to the `k` most likely tokens at each decoding step.
        stop_sequences:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Stop Sequences
          description: Stop strings that terminate generation when matched in output. The matched value is returned in `stop_sequence` when applicable.
        tools:
          anyOf:
          - items:
              $ref: '#/components/schemas/MessagesToolDefinition'
            type: array
          - type: 'null'
          title: Tools
          description: Tool definitions available to the model. Use this to allow tool calls with structured arguments.
        tool_choice:
          anyOf:
          - $ref: '#/components/schemas/MessagesToolChoice'
          - type: 'null'
          description: Controls tool-calling behavior (`auto`, `any`, `tool`, `none`) and optional parallel-call behavior.
        thinking:
          anyOf:
          - $ref: '#/components/schemas/MessagesThinkingConfig'
          - type: 'null'
          description: Controls reasoning behavior with mode (`enabled`, `disabled`, `adaptive`). `enabled` requires `budget_tokens`; `disabled` and `adaptive` must not include it.
        output_config:
          anyOf:
          - $ref: '#/components/schemas/MessagesOutputConfig'
          - type: 'null'
          description: Output generation options including effort level and structured output format settings.
        cache_control:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Cache Control
          description: Compatibility field accepted for request portability. Parsed but not used for generation.
        container:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Container
          description: Compatibility field accepted for request portability. Parsed but not used for generation.
        context_manager:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Context Manager
          description: Compatibility field accepted for request portability. Parsed but not used for generation.
        inference_geo:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Inference Geo
          description: Compatibility field accepted for request portability. Parsed but not used for generation.
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
          description: Compatibility field accepted for request portability. Parsed but not used for generation.
        service_tier:
          anyOf:
          - type: string
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Service Tier
          description: Compatibility field accepted for request portability. Parsed but not used for generation.
      additionalProperties: true
      type: object
      required:
      - messages
      title: ContainerMessagesBody
      example:
        messages:
        - content: Hello, summarize what you can do in one sentence.
          role: user
        model: zai-org/GLM-5.2
    MessagesStreamContentBlockStart:
      properties:
        type:
          type: string
          const: content_block_start
          title: Type
          description: The type of the event.
        index:
          type: integer
          title: Index
          description: Index of the content block in the response `content` array.
        content_block:
          $ref: '#/components/schemas/MessagesStreamContentBlockStartPayload'
          description: Initial content block payload.
      type: object
      required:
      - type
      - index
      - content_block
      title: MessagesStreamContentBlockStart
    MessagesResponseThinkingBlock:
      properties:
        type:
          type: string
          const: thinking
          title: Type
          description: Content block type.
        thinking:
          type: string
          title: Thinking
          description: Reasoning content returned by the model.
        signature:
          type: string
          title: Signature
          description: Signature associated with the reasoning content.
      type: object
      required:
      - type
      - thinking
      - signature
      title: MessagesResponseThinkingBlock
    MessagesToolChoice:
      properties:
        type:
          type: string
          enum:
          - auto
          - any
          - tool
          - none
          title: Type
          description: Tool-calling mode. `auto` lets the model decide, `any` requires at least one tool call, `tool` forces a named tool, and `none` disables tool calls.
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
          description: Tool name to force when `type=tool`. Ignored for other `type` values.
        disable_parallel_tool_use:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Disable Parallel Tool Use
          description: If true, restricts the model to at most one tool call at a time. Must not be provided when `type=none`.
      type: object
      required:
      - type
      title: MessagesToolChoice
    MessagesStreamErrorDetail:
      properties:
        type:
          type: string
          title: Type
          description: Error category, such as `invalid_request_error`.
        message:
          type: string
          title: Message
          description: Human-readable error message.
      type: object
      required:
      - type
      - message
      title: MessagesStreamErrorDetail
    MessagesStreamStartToolUseBlock:
      properties:
        type:
          type: string
          const: tool_use
          title: Type
          description: Content block type.
        id:
          type: string
          title: Id
          description: Tool call ID when `type=tool_use`.
        name:
          type: string
          title: Name
          description: Tool name when `type=tool_use`.
        input:
          additionalProperties: true
          type: object
          title: Input
          description: Parsed tool input object when `type=tool_use`.
      type: object
      required:
      - type
      - id
      - name
      - input
      title: MessagesStreamStartToolUseBlock
    MessagesInputMessage:
      properties:
        role:
          type: string
          enum:
          - user
          - assistant
          title: Role
          description: Author role for this message turn. Use `user` for user input and `assistant` for prior assistant turns.
        content:
          anyOf:
          - type: string
          - items:
              $ref: '#/components/schemas/MessagesContentBlock'
            type: array
          title: Content
          description: Message payload. Supports plain string shorthand or a typed block array.
      type: object
      required:
      - role
      - content
      title: MessagesInputMessage
    MessagesStreamSignatureDelta:
      properties:
        type:
          type: string
          const: signature_delta
          title: Type
          description: Delta type.
        signature:
          type: string
          title: Signature
          description: Signature fragment when `type=signature_delta`.
      type: object
      required:
      - type
      - signature
      title: MessagesStreamSignatureDelta
    MessagesOutputConfig:
      properties:
        effort:
          anyOf:
          - type: string
            enum:
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
            - ultracode
          - type: 'null'
          title: Effort
          description: Relative generation effort level. Higher effort can improve quality on harder prompts at the cost of additional compute.
        format:
          anyOf:
          - $ref: '#/components/schemas/MessagesOutputFormat'
          - type: 'null'
          description: Structured output settings. Currently supports only `json_schema`.
      type: object
      title: MessagesOutputConfig
    MessagesImageSource:
      oneOf:
      - $ref: '#/components/schemas/MessagesBase64ImageSource'
        title: Base64
      - $ref: '#/components/schemas/MessagesUrlImageSource'
        title: URL
      discriminator:
        propertyName: type
        mapping:
          base64: '#/components/schemas/MessagesBase64ImageSource'
          url: '#/components/schemas/MessagesUrlImageSource'
    ContainerMessagesSuccess:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for this message response.
        type:
          type: string
          const: message
          title: Type
          description: Response object type (`message`).
        role:
          type: string
          const: assistant
          title: Role
          description: Role of the output message author (`assistant`).
        content:
          items:
            $ref: '#/components/schemas/MessagesResponseContentBlock'
          type: array
          title: Content
          description: Assistant output blocks in generation order.
        stop_reason:
          anyOf:
          - type: string
            enum:
            - end_turn
            - max_tokens
            - tool_use
            - stop_sequence
          - type: 'null'
          title: Stop Reason
          description: Why generation stopped (`end_turn`, `max_tokens`, `tool_use`, `stop_sequence`).
        stop_sequence:
          anyOf:
          - type: string
          - type: 'null'
          title: Stop Sequence
          description: Matched stop string when `stop_reason` is `stop_sequence`; otherwise null.
        usage:
          $ref: '#/components/schemas/MessagesUsage'
          description: Token usage details for this response.
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
          description: Model used to generate the response.
      additionalProperties: true
      type: object
      required:
      -

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/friendliai/refs/heads/main/openapi/friendliai-container-messages-api-openapi.yml