Agent ファイルをアップロードする
Thread 作成前に Agent API Endpoint の Project draft scope にファイルをアップロードします。返された file ID を create-thread または send-events の resources で使用します。
/agents/{agentId}/filesThread 作成前に Agent API Endpoint の Project draft scope にファイルをアップロードします。返された file ID を create-thread または send-events の resources で使用します。
Authorization
publicApiBearer Authorization: Bearer msp_... を使用します。Project API key は同じ Project の Agent 設定、Session 実行、ファイルアクセスに限定されます。キーと account の管理には console または CLI ログインが必要です。旧 account token は拒否されます。
In: header
Path Parameters
Agent の API アクセス パネルからの Agent API Endpoint ID。 v1 ID は裸の ULID です。
^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ulidRequest Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/agents/01J00000000000000000000001/files" \ -F file="string"{ "file": { "createdAt": "2026-05-19T00:02:00.000Z", "id": "01J0000000000000000000000J", "mimeType": "text/plain", "name": "brief.txt", "size": 19 }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}