Send prompt
Send a follow-up prompt to an existing session. Accepts either `application/json` or `multipart/form-data` (JSON request in the `data` field, files in `attachments`). By default prompts are delivered immediately. Set `delivery` to `queued` to enqueue the prompt behind active or outstanding work. If the session has no outstanding prompts, the prompt is delivered immediately and `queued_prompt` is omitted, restarting a dormant sandbox when necessary. Prompts that remain queued may not appear in `/messages` until they are released and processed.
Send a follow-up prompt to an existing session. Accepts either application/json or multipart/form-data (JSON request in the data field, files in attachments). By default prompts are delivered immediately. Set delivery to queued to enqueue the prompt behind active or outstanding work. If the session has no outstanding prompts, the prompt is delivered immediately and queued_prompt is omitted, restarting a dormant sandbox when necessary. Prompts that remain queued may not appear in /messages until they are released and processed.
bearerAuthAuthorizationBearer <token>API key authentication. Use your API key as the bearer token.
session_id*stringThe unique identifier of the session
- body
review_buddy_reviewers?array<>Optional Review agent reviewers merged into the session's reviewers. Each model must be available to the caller and support the requested reasoning effort.
prompt?stringThe follow-up prompt to accept. At least one of prompt, attachments, or agent_context is required.
no_reply?booleanIf true, stores the prompt and dispatches the runner silently without posting an assistant reply back into the session timeline.
falsemodel?||Optional model ID or shorthand alias to switch to for this prompt. When omitted, the session keeps its current model. Use GET /api/public/v1/models for model IDs and aliases.
variant?Models.ModelVariant"low""medium""high""xhigh""max""minimal""none"agent?stringDeprecatedDeprecated. This field is ignored for session APIs and only kept for backwards compatibility.
agent_context?stringOptional additional context for the agent that will not appear in user messages.
commit_prefix?stringOptional prefix to prepend to commit messages and PR titles.
delivery?Sessions.PromptDeliveryimmediate (default) dispatches the prompt right away. queued stores the prompt behind active or outstanding work and returns queued_prompt metadata. If an existing session has no outstanding prompts, a queued request is promoted to immediate delivery, queued_prompt is omitted, and a dormant sandbox is restarted.
"immediate""immediate""queued"Prompt accepted successfully
application/json- response
data*queued_prompt?Present only when the prompt remained queued.
curl -X POST 'https://your-org.inspect.com/api/public/v1/sessions/string/prompt' \ -H 'Content-Type: application/json' \ -d '{}'{ "data": { "id": "string", "title": "string", "description": "string", "status": "pending", "retryable": true, "visibility": "public", "model": { "id": "string", "name": "string", "provider": "string", "variant": "string" }, "user": { "id": "string", "name": "string", "email": "string", "image": "string" }, "openingPr": true, "pushing": true, "workingPhase": "string", "deployed": true, "deployUrl": "string", "deployLastSucceededAt": "2019-08-24T14:15:22Z", "deployCommitSha": "string", "latestCommitSha": "string", "deploy": { "active": true, "url": "string", "commitSha": "string", "latestCommitSha": "string", "lastSucceededAt": "2019-08-24T14:15:22Z", "lastAttemptStatus": "succeeded", "lastAttemptCommitSha": "string", "lastAttemptStartedAt": 0, "timedOut": true, "outdated": true }, "vncUrl": "string", "vncExpiresAt": "2019-08-24T14:15:22Z", "otaInstallUrl": "string", "otaQrCodeUrl": "string", "otaExpiresAt": "2019-08-24T14:15:22Z", "hasChanges": true, "diffFileId": "string", "localDiffFileId": "string", "diffSource": "local", "diffAdditions": 0, "diffDeletions": 0, "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "lastReadAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "pullRequests": [ { "repository": "string", "githubRepository": "string", "url": "http://example.com", "pullRequestNumber": 0, "adoptedAt": "2019-08-24T14:15:22Z", "statusUpdatedAt": "2019-08-24T14:15:22Z", "title": "string", "reviewBuddyInspectSessionId": "string", "approvalStatus": { "stampBuddy": { "sourceSequence": 0, "generation": 0, "publicationSequence": 0, "headSha": "string", "baseRef": "string", "viewStatus": "ready", "status": "not_started", "current": true, "reason": "string", "rationale": { "version": 1, "sections": [ { "title": "string", "items": [ { "title": "string", "status": "passed", "summary": "string", "sessions": [ "string" ], "details": [ { "label": "string", "text": "string", "values": [ "string" ] } ] } ] } ] }, "riskTier": "no_risk", "autoApproval": "pending", "history": [ { "headSha": "string", "sessionId": "string", "status": "not_started", "autoApproval": "pending", "updatedAt": "2019-08-24T14:15:22Z" } ], "grantApprovalBinding": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "smartReviewer": { "sourceSequence": 0, "generation": 0, "publicationSequence": 0, "headSha": "string", "baseRef": "string", "status": "not_started", "current": true, "reason": "string", "recommendation": { "login": "string", "status": "available", "reasoning": "string", "selectionReason": "string" }, "requestReviewBinding": "string", "updatedAt": "2019-08-24T14:15:22Z" } }, "status": "draft", "mergedAt": "2019-08-24T14:15:22Z", "author": { "login": "string", "displayName": "string", "avatarUrl": "string", "profileUrl": "string" } } ], "repositories": [ { "id": "string", "isPrimary": true, "stateUpdatedAt": "2019-08-24T14:15:22Z", "branchName": "string", "baseBranch": "string", "latestCommitSha": "string", "diff": { "fileId": "string", "localFileId": "string", "source": "local", "additions": 0, "deletions": 0 } } ], "branchName": "string", "baseBranch": "string", "stackBaseBranch": "string", "helpfulness": 0, "helpfulnessReason": "string", "totalInputTokens": 0, "totalOutputTokens": 0, "totalReasoningTokens": 0, "totalCacheReadTokens": 0, "totalCacheWriteTokens": 0, "totalTokens": 0, "totalCost": 0, "lastUserMessageAt": "2019-08-24T14:15:22Z", "parentSessionId": "string", "projectId": "string", "childSessions": [ { "id": "string", "title": "string", "metadata": { "name": "string" }, "status": "pending", "createdAt": "2019-08-24T14:15:22Z" } ], "tags": [ "string" ], "metadata": { "runtime": "laminar", "laminarStartupPending": true, "laminarRuntime": { "sessionId": "string", "backend": "cell", "displayReadyAt": "string" }, "name": "string", "tags": [ "string" ], "prLabels": [ "string" ], "mobileDeployOtaCommitSha": "string", "hiddenFromDashboard": true, "projectCoordinator": true, "privateConnectorVisibility": { "connectorIds": [ "string" ], "connectorNames": [ "string" ], "forcedAt": "string" }, "lastDeployEventTs": 0, "lastDeployStatus": "succeeded", "lastDeployCommitSha": "string", "secondaryDeployUrls": {}, "customAgentPromptVersion": 0, "serviceTier": "string", "modelClass": "fast", "benchmarkFork": { "repoId": "string", "baseCommit": "string", "baseBranch": "string", "repo": "string" }, "reviewRequested": true, "reviewRequestDestinations": [ { "label": "string", "url": "string" } ], "autoMergeEnabled": true, "automationFanoutSummary": { "primaryChannelId": "string", "summaryMessageTs": "string", "entries": [ { "channelId": "string", "channelName": "string", "title": "string", "permalink": "string", "postedAt": "string", "targetRepo": "string", "priority": "high", "proposalId": "string", "proposalStatus": "closed", "childSessionId": "string" } ] }, "adminApiRequests": [ { "id": "string", "expiresAt": "string" } ], "githubInspectMentionCount": 0, "githubInspectMentionsPaused": true, "structuredOutput": { "status": "error", "output": null, "error": "string" }, "automationTrigger": { "type": "manual", "details": "string", "automationRunId": "string", "startingInternalState": {} } }, "automation": { "id": "string", "name": "string" }, "automationTriggerSource": "scheduled", "contextualActions": { "sourceAssistantMessageId": "string", "suggestions": [ { "actionKey": "send_prompt", "label": "string", "prompt": "string", "repository": "string", "pullRequestNumber": 0 } ] }, "settings": { "ciFailuresEnabled": true, "autoReviewEnabled": true, "autoAddressPrReviewsPolicy": { "enabled": true, "reviewerCategories": { "human": true, "bot": true }, "identityRules": [ { "selector": "string", "ruleType": "allow" } ], "reviewBuddy": { "enabled": true, "enabledFindingTypes": [ "critical" ] } } }, "isOwner": true, "isReadonly": true, "participants": [ { "id": "string", "sessionId": "string", "userId": "string", "joinedAt": "2019-08-24T14:15:22Z", "lastActiveAt": "2019-08-24T14:15:22Z", "leftAt": "2019-08-24T14:15:22Z", "user": { "id": "string", "name": "string", "email": "string", "image": "string" } } ], "agent": { "id": "string", "name": "string", "model": "string", "avatarUrl": "string" }, "workspace": { "id": "string", "name": "string", "description": "string", "organization": "string", "remote": "github", "githubHost": "github", "baseBranch": "string" }, "workspaceRef": "string", "repository": { "id": "string", "name": "string", "description": "string", "organization": "string", "remote": "github", "githubHost": "github", "baseBranch": "string" }, "pullRequest": { "pullRequestNumber": 0, "adoptedAt": "2019-08-24T14:15:22Z", "title": "string", "status": "draft", "mergedAt": "2019-08-24T14:15:22Z", "author": { "login": "string", "displayName": "string", "avatarUrl": "string", "profileUrl": "string" } }, "pullRequestNumber": 0, "pullRequestStatus": "draft" }, "queued_prompt": { "id": "string", "created_at": "2019-08-24T14:15:22Z" }}