ورود | ثبت نام
  • FA
  • EN

API Docs

AI Thread Message Resource

Represents a message in an AI thread, including content, role, state, and timestamps.


Schema

FieldTypeDescriptionExample
idintUnique identifier for the message123
thread_idintID of the thread123
contentstringMessage content"Hello!"
rolestringRole of the sender (user or assistant)"user"
updated_contextobjectDeprecated — always null for new messages (kept for released-app compatibility; old rows keep their stored values)null
statusstringMessage state: completed, or pending_confirmation when an interactive run paused on a confirmation-required tool"completed"
function_callsarray|nullThe raw tool calls the assistant made in this message (assistant messages only)[ { ... } ]
pending_tool_callsarray|nullTool calls not yet executed while the message awaits confirmation[ { ... } ]
attachmentsarrayAttached files' metadata (present when loaded — always on create/list responses)[ { ... } ]
created_atstringCreation timestamp (ISO 8601 format)"2020-01-01 00:00:00"

For the attachment item shape, see AI Thread Message Attachment Resource.


Example

{
  "id": 123,
  "thread_id": 123,
  "content": "Hello!",
  "role": "user",
  "updated_context": null,
  "status": "completed",
  "function_calls": null,
  "pending_tool_calls": null,
  "attachments": [
    {
      "id": 5,
      "message_id": 123,
      "original_name": "photo.jpg",
      "mime_type": "image/jpeg",
      "size_bytes": 84213,
      "url": "/api/v1/ai/threads/123/messages/123/attachments/5",
      "created_at": "2020-01-01 00:00:00"
    }
  ],
  "created_at": "2020-01-01 00:00:00"
}
Dambel

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutubeTelegramGitHub