runs

List Run Messages

Get response messages associated with a run.

get/v1/runs/{run_id}/messages

Path parameters

run_idstring required

Query parameters

beforestring nullable

Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order

Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order

afterstring nullable

Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order

Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order

limitinteger nullable

Maximum number of messages to return

Maximum number of messages to return

order'asc' | 'desc'

Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first

Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first

order_by'created_at'

Field to sort by

Field to sort by

Response

Successful Response

Changes

Changed in 4 of the 36 revisions of this API.11

    • added the optional property items/oneOf[subschema #5: ToolCallMessage]/tool_calls to the response with the 200 status

      response-optional-property-added

    • response property items/oneOf[subschema #5: ToolCallMessage]/tool_call deprecated

      response-property-deprecated

    • added the optional property items/oneOf[subschema #6: ToolReturnMessage]/tool_returns to the response with the 200 status

      response-optional-property-added

    • response property items/oneOf[subschema #6: ToolReturnMessage]/status deprecated

      response-property-deprecated

    • response property items/oneOf[subschema #6: ToolReturnMessage]/stderr deprecated

      response-property-deprecated

    • response property items/oneOf[subschema #6: ToolReturnMessage]/stdout deprecated

      response-property-deprecated

    • response property items/oneOf[subschema #6: ToolReturnMessage]/tool_call_id deprecated

      response-property-deprecated

    • response property items/oneOf[subschema #6: ToolReturnMessage]/tool_return deprecated

      response-property-deprecated

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property items/oneOf[subschema #2: UserMessage]/content/anyOf[subschema #1]/items/oneOf[subschema #1: TextContent]/signature to the response with the 200 status

      response-optional-property-added

    • added the optional property items/oneOf[subschema #7: AssistantMessage]/content/anyOf[subschema #1]/items/oneOf[subschema #1: TextContent]/signature to the response with the 200 status

      response-optional-property-added

    • added the new optional query request parameter order_by

      new-optional-request-parameter