Project Session を作成
harness・モデル・指示を inline で明示するか、対象 Project の任意の保存済み Agent プリセットで永続 Session を作成します。Project のモデル認証情報が必要です。入力とファイルは任意です。作成時に有効な設定を固定し、隠れた Agent は作成しません。
/projects/{projectId}/threadsharness・モデル・指示を inline で明示するか、対象 Project の任意の保存済み Agent プリセットで永続 Session を作成します。Project のモデル認証情報が必要です。入力とファイルは任意です。作成時に有効な設定を固定し、隠れた Agent は作成しません。継続時も返された Thread ID を使用します。
Authorization
publicApiBearer Authorization: Bearer msp_... を使用します。Project API key は同じ Project の Agent 設定、Session 実行、ファイルアクセスに限定されます。キーと account の管理には console または CLI ログインが必要です。旧 account token は拒否されます。
In: header
Path Parameters
所有する Project。Project キーは所属 Project にのみアクセスできます。CLI ログインでは所有する Project を明示します。
^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$ulidHeader Parameters
再試行安全なスレッド作成およびイベント送信呼び出しのオプションのキー。同じリクエストで同じキーを再利用すると、元のレスポンスが返されます。元のリクエストの処理中にキーを再利用すると、409 が返されます。
length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
inline 設定または任意の保存済み Agent プリセットで、Project 所有の永続 Session を作成します。inline 実行では Agent を作成しません。対象 Project にモデル認証情報を設定しておく必要があります。
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/projects/01ARZ3NDEKTSV4RRFFQ69G5FAV/threads" \ -H "Idempotency-Key: thread-20260528-linear-eng-123" \ -H "Content-Type: application/json" \ -d '{ "configuration": { "type": "inline", "harness": "openai-runtime", "provider": "openai", "model": "gpt-5.6-luna", "instructions": "Analyze the supplied material and save the results." }, "input": { "type": "user.message", "content": [ { "type": "text", "text": "Create an analysis report." } ] } }'{ "links": { "thread": "string" }, "run": { "completedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "error": { "code": "string", "message": "string", "retryable": true }, "finalOutput": { "text": "string", "warnings": [ { "code": "unresolved_provider_citation", "count": 1 } ] }, "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "startedAt": "2019-08-24T14:15:22Z", "status": "queued", "trigger": "user_prompt", "updatedAt": "2019-08-24T14:15:22Z" }, "thread": { "agent_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2019-08-24T14:15:22Z", "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "last_run_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "source": "api", "status": "IDLE", "title": "string", "updated_at": "2019-08-24T14:15:22Z", "userId": "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" }}{ "error": { "code": "agent_not_published", "message": "string" }}