Skip to main content
GET
This endpoint returns a unified git diff of all changes made by the agent in the sandbox workspace. If the workspace is a git repository, it produces a proper git diff output. For non-git workspaces, it falls back to a pseudo-diff listing all file contents.

Authentication

To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:
  1. Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
  2. Once provisioning completes, you will be redirected to your Dashboard
  3. From the Dashboard, create an API key to use with all Agent API requests
Your API key will be in the format: sk-xxxxxxxxxxxxxxxxxxxxxx

Headers

string
required
API Key of the form Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560

Path Parameters

string
required
The unique run identifier returned when the task was created.

Query Parameters

string
default:"/vercel/sandbox"
Workspace path to diff.Default: /vercel/sandbox
string
default:"HEAD"
Git ref to diff against.
  • "HEAD" — diff staged + unstaged changes against HEAD (default)
  • "initial" — diff from the very first commit to current working tree
Example: base=initial

Response Fields

string
Unified diff output. Empty string if no changes.
string
The workspace path that was diffed.
boolean
Whether the workspace is a git repository.
string | null
The git ref used as the diff base. null for non-git workspaces.

Error Codes