v1

latestOpenAPI 3.0.12026-07-269427.8 KB

Create agent job (v1)

Deprecated: use v2 create agent job instead. Creates a new agent job that can generate and edit documentation based on provided messages and branch information.

Authenticate with an admin API key.

post/v1/agent/{projectId}/job

Path parameters

projectIdstring required

Your project ID. Can be copied from the API keys page in your dashboard.

Request body

branchstring

The name of the Git branch that the agent should work on. If omitted, the agent generates a branch name based on the message content.

asDraftboolean

Control whether the pull request is created in draft or non-draft mode. When true, creates a draft pull request. When false (default), creates a regular pull request ready for review.

model'sonnet' | 'opus'

The AI model to use for the agent job. Use sonnet for faster, cost-effective processing. Use opus for more capable, but slower processing.

Response

Agent job created successfully. Returns a streaming response with Server-Sent Events.

All 9 operations