メインコンテンツへスキップ
POST
/
api
/
v0
/
sessions
/
{sessionId}
/
messages
Add a message to a session
curl --request POST \
  --url https://api.factory.ai/api/v0/sessions/{sessionId}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "images": [
    {
      "type": "base64",
      "data": "<string>",
      "mediaType": "image/jpeg"
    }
  ],
  "files": [
    {
      "type": "base64",
      "mediaType": "application/pdf",
      "data": "<string>",
      "parsedData": "<string>",
      "name": "<string>",
      "path": "<string>"
    }
  ],
  "computerId": "<string>"
}
'
{
  "messageId": "<string>",
  "status": "idle"
}

Documentation Index

Fetch the complete documentation index at: https://docs.factory.ai/llms.txt

Use this file to discover all available pages before exploring further.

承認

Authorization
string
header
必須

Factory API key or JWT token for authentication

パスパラメータ

sessionId
string
必須

ボディ

application/json
text
string
必須

Message text content

images
object[]

Optional base64-encoded images

files
object[]

Optional file attachments (PDFs, text files)

computerId
string

Computer ID to route the message to; falls back to the session.computerId if omitted

レスポンス

Response for status 200

messageId
string
必須

ID of the created user message

status
enum<string>
必須

Agent status after message submission

利用可能なオプション:
idle,
pending,
running