For the complete documentation index, see llms.txt. This page is also available as Markdown.

Codeset API

Health Check

get

Health check endpoint

Responses
200

Successful Response

application/json

Response model for health check endpoint.

statusstringRequired

Health status of the service

servicestringRequired

Name of the service

versionstringRequired

Version of the service

timestampstringRequired

Timestamp when the health check was performed (ISO format)

get/health
Python
import os
from codeset import Codeset

client = Codeset(
    api_key=os.environ.get("CODESET_API_KEY"),  # This is the default and can be omitted
)
response = client.health.check()
print(response.service)
200

Successful Response

{
  "status": "text",
  "service": "text",
  "version": "text",
  "timestamp": "text"
}

Github Oauth

post

Authenticate user with GitHub OAuth

Body

Request for GitHub OAuth authentication.

codestringRequired

Authorization code from GitHub OAuth.

statestring · nullableOptional

State parameter for CSRF protection.

redirect_uristring · nullableOptional

Callback URL used in the authorize step; must match app settings.

Responses
200

Successful Response

application/json

Response for GitHub OAuth authentication.

user_idstringRequired

Unique identifier for the user.

access_tokenstringRequired

JWT access token for the user.

refresh_tokenstringRequired

JWT refresh token for the user.

token_typestringOptional

Token type.

Default: Bearer
expires_inintegerRequired

Access token expiration time in seconds.

is_new_userbooleanRequired

Whether this is a new user or existing user.

post/auth/github
POST /api/v1/auth/github HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "code": "text",
  "state": "text",
  "redirect_uri": "text"
}
{
  "user_id": "text",
  "access_token": "text",
  "refresh_token": "text",
  "token_type": "Bearer",
  "expires_in": 1,
  "is_new_user": true
}

List Repos

get
Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Responses
200

Successful Response

application/json
get/repos
GET /api/v1/repos HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "repos": [
    {
      "full_name": "text",
      "private": true,
      "html_url": "text"
    }
  ]
}

Refresh Token

post

Refresh an access token using a refresh token

Body

Request to refresh an access token.

refresh_tokenstringRequired

The refresh token.

Responses
200

Successful Response

application/json

Response for token refresh.

access_tokenstringRequired

New JWT access token.

token_typestringOptional

Token type.

Default: Bearer
expires_inintegerRequired

Access token expiration time in seconds.

post/auth/refresh
POST /api/v1/auth/refresh HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "refresh_token": "text"
}
{
  "access_token": "text",
  "token_type": "Bearer",
  "expires_in": 1
}

Get Current User

get

Get current user information

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Responses
200

Successful Response

application/json

Represents a user in the system.

user_idstringRequired

Unique identifier for the user.

namestringRequired

Display name of the user.

emailstringRequired

Email address of the user.

github_idstring · nullableOptional

GitHub user ID for OAuth authentication.

github_loginstring · nullableOptional

GitHub username (login) for matching app installations.

created_atstring · date-timeRequired

Timestamp when the user was created (UTC).

last_login_atstring · date-time · nullableOptional

Timestamp of the user's last login (UTC).

is_activebooleanOptional

Whether the user account is active.

Default: true
terms_accepted_atstring · date-time · nullableOptional

When the user last accepted the terms of service (UTC). None if not accepted.

get/users/me
GET /api/v1/users/me HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "user_id": "text",
  "name": "text",
  "email": "text",
  "github_id": "text",
  "github_login": "text",
  "api_keys": [
    {
      "key_id": "text",
      "key": "text",
      "name": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z",
      "is_active": true,
      "last_used_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "last_login_at": "2026-01-01T00:00:00.000Z",
  "is_active": true,
  "terms_accepted_at": "2026-01-01T00:00:00.000Z"
}

Accept Terms

post

Record that the current user has accepted the terms of service.

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Responses
200

Successful Response

application/json

Represents a user in the system.

user_idstringRequired

Unique identifier for the user.

namestringRequired

Display name of the user.

emailstringRequired

Email address of the user.

github_idstring · nullableOptional

GitHub user ID for OAuth authentication.

github_loginstring · nullableOptional

GitHub username (login) for matching app installations.

created_atstring · date-timeRequired

Timestamp when the user was created (UTC).

last_login_atstring · date-time · nullableOptional

Timestamp of the user's last login (UTC).

is_activebooleanOptional

Whether the user account is active.

Default: true
terms_accepted_atstring · date-time · nullableOptional

When the user last accepted the terms of service (UTC). None if not accepted.

post/users/me/accept-terms
POST /api/v1/users/me/accept-terms HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "user_id": "text",
  "name": "text",
  "email": "text",
  "github_id": "text",
  "github_login": "text",
  "api_keys": [
    {
      "key_id": "text",
      "key": "text",
      "name": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z",
      "is_active": true,
      "last_used_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "created_at": "2026-01-01T00:00:00.000Z",
  "last_login_at": "2026-01-01T00:00:00.000Z",
  "is_active": true,
  "terms_accepted_at": "2026-01-01T00:00:00.000Z"
}

Create Api Key

post

Create a new API key for the current user

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Body

Request to create a new API key for a user.

namestring · nullableOptional

Optional name for the API key.

Responses
200

Successful Response

application/json

Response for creating an API key.

post/users/me/api-keys
POST /api/v1/users/me/api-keys HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "api_key": {
    "key_id": "text",
    "key": "text",
    "name": "text",
    "created_at": "2026-01-01T00:00:00.000Z",
    "expires_at": "2026-01-01T00:00:00.000Z",
    "is_active": true,
    "last_used_at": "2026-01-01T00:00:00.000Z"
  }
}

Revoke Api Key

delete

Revoke an API key for the current user

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Body

Request to revoke an API key.

key_idstringRequired

The ID of the API key to revoke.

Responses
200

Successful Response

application/json

Response for revoking an API key.

messagestringRequired

Success message.

revoked_key_idstringRequired

The ID of the revoked API key.

delete/users/me/api-keys
DELETE /api/v1/users/me/api-keys HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "key_id": "text"
}
{
  "message": "text",
  "revoked_key_id": "text"
}

List Datasets

get

List available datasets

Responses
200

Successful Response

application/json

Information about a dataset.

namestringRequired

Unique name of the dataset.

descriptionstring · nullableOptional

A brief description of the dataset.

sample_countintegerRequired

Number of samples in the dataset.

created_atstring · date-time · nullableOptional

Timestamp when the dataset was first created (UTC).

get/datasets
Python
import os
from codeset import Codeset

client = Codeset(
    api_key=os.environ.get("CODESET_API_KEY"),  # This is the default and can be omitted
)
datasets = client.datasets.list()
print(datasets)
200

Successful Response

[
  {
    "name": "text",
    "description": "text",
    "sample_count": 1,
    "created_at": "2026-01-01T00:00:00.000Z"
  }
]

List Samples

get

List available samples with optional pagination, optionally filtered by dataset

Query parameters
datasetstring · nullableOptional

Filter samples by dataset name

searchstring · nullableOptional

Search for samples by instance_id

pageinteger · min: 1 · nullableOptional

Page number (1-based). If not provided, returns all samples

page_sizeinteger · min: 1 · max: 100 · nullableOptional

Number of samples per page (max 100). If not provided, returns all samples

Responses
200

Successful Response

application/json

Response for listing samples with pagination.

total_countintegerRequired

Total number of samples available.

pageintegerRequired

Current page number (1-based).

page_sizeintegerRequired

Number of samples per page.

has_morebooleanRequired

Indicates if more pages of results are available.

get/samples
Python
import os
from codeset import Codeset

client = Codeset(
    api_key=os.environ.get("CODESET_API_KEY"),  # This is the default and can be omitted
)
samples = client.samples.list()
print(samples.has_more)
{
  "samples": [
    {
      "sample_id": "text",
      "description": "text",
      "language": "text",
      "verifier": "test_suite",
      "dataset": "text",
      "version": 1,
      "version_description": "text",
      "latest": true,
      "created_at": "2026-01-01T00:00:00.000Z",
      "instance_id": "text",
      "repo": "text",
      "base_commit": "text",
      "patch": "text",
      "non_code_patch": "text",
      "test_patch": "text",
      "problem_statement": "text",
      "hints_text": "text",
      "environment_setup_commit": "text",
      "fail_to_pass": [
        "text"
      ],
      "pass_to_pass": [
        "text"
      ],
      "fail_to_fail": [
        "text"
      ]
    }
  ],
  "total_count": 1,
  "page": 1,
  "page_size": 1,
  "has_more": true
}

Download Sample

get

Download the gz file for a specific sample

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
datasetstringRequired
sample_idstringRequired
Query parameters
versioninteger · nullableOptional
Responses
200

Successful Response

application/json
anyOptional
get/samples/{dataset}/{sample_id}/download
Python
from codeset import Codeset

client = Codeset()
response = client.samples.download(
    sample_id="sample_id",
    dataset="dataset",
)
print(response)

No content

List Sessions

get

List environment sessions

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Responses
200

Successful Response

application/json

Response for listing sessions.

total_countintegerRequired

Total number of sessions returned.

has_morebooleanRequired

Indicates if more pages of results are available.

get/sessions
Python
from codeset import Codeset

client = Codeset()
sessions = client.sessions.list()
print(sessions.has_more)
200

Successful Response

{
  "sessions": [
    {
      "session_id": "text",
      "user_id": "text",
      "dataset": "text",
      "sample_id": "text",
      "status": "creating",
      "requested_at": "2026-01-01T00:00:00.000Z",
      "created_at": "2026-01-01T00:00:00.000Z",
      "expires_at": "2026-01-01T00:00:00.000Z",
      "duration_seconds": 1,
      "container_info": {
        "container_name": "text",
        "service_url": "https://example.com",
        "sample_id": "text",
        "status": "text",
        "created_at": "2026-01-01T00:00:00.000Z",
        "expires_at": "2026-01-01T00:00:00.000Z",
        "location": "text"
      },
      "error": {
        "code": "text",
        "message": "text"
      }
    }
  ],
  "total_count": 1,
  "has_more": true
}

Create Session

post

Create a new session

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Body

Request to create a new session.

datasetstringRequired

Dataset name for the sample.

sample_idstringRequired

Identifier of the sample to use for this session.

ttl_minutesintegerOptional

Time to live for the session in minutes (default: 30).

Default: 30
Responses
201

Successful Response

application/json

Response for creating a session.

session_idstringRequired

Unique identifier for the created session.

statusstring · enumRequired

Initial status of the session.

Possible values:
expires_atstring · date-timeRequired

Timestamp when the session will expire (UTC).

post/sessions
Python
from codeset import Codeset

client = Codeset()
session = client.sessions.create(
    dataset="dataset",
    sample_id="sample_id",
)
print(session.session_id)
{
  "session_id": "text",
  "status": "creating",
  "expires_at": "2026-01-01T00:00:00.000Z"
}

Get Session

get

Get session details

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
session_idstringRequired
Responses
200

Successful Response

application/json

Represents a session for multi-turn interactions.

session_idstringRequired

Unique identifier for the session.

user_idstringRequired

User ID who owns this session.

datasetstringRequired

Dataset name for the sample.

sample_idstringRequired

Identifier of the sample being used for the session.

statusstring · enumRequired

Current status of the session.

Possible values:
requested_atstring · date-timeRequired

Timestamp when the session was requested (UTC).

created_atstring · date-time · nullableOptional

Timestamp when the container became ready and billing started (UTC).

expires_atstring · date-timeRequired

Timestamp when the session will expire (UTC).

duration_secondsnumber · nullableOptional

Duration of the session in seconds.

get/sessions/{session_id}
Python
from codeset import Codeset

client = Codeset()
session = client.sessions.retrieve(
    "session_id",
)
print(session.sample_id)
{
  "session_id": "text",
  "user_id": "text",
  "dataset": "text",
  "sample_id": "text",
  "status": "creating",
  "requested_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "expires_at": "2026-01-01T00:00:00.000Z",
  "duration_seconds": 1,
  "container_info": {
    "container_name": "text",
    "service_url": "https://example.com",
    "sample_id": "text",
    "status": "text",
    "created_at": "2026-01-01T00:00:00.000Z",
    "expires_at": "2026-01-01T00:00:00.000Z",
    "location": "text"
  },
  "error": {
    "code": "text",
    "message": "text"
  }
}

Close Session

delete

Close/delete an environment session

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
session_idstringRequired
Responses
200

Successful Response

application/json

Response model for session deletion.

messagestringRequired

Success message confirming session deletion

duration_secondsnumberRequired

Duration of the session in seconds.

delete/sessions/{session_id}
Python
from codeset import Codeset

client = Codeset()
response = client.sessions.close(
    "session_id",
)
print(response.duration_seconds)
{
  "message": "text",
  "duration_seconds": 1
}

Execute Command

post

Start command execution in an environment (async)

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
session_idstringRequired
Body

Request to execute a bash command in a session.

commandstringRequired

The bash command to execute.

command_timeoutintegerOptional

Timeout for command execution in seconds (default: 300).

Default: 300
Responses
202

Successful Response

application/json

Response for starting command execution (async).

interaction_idstringRequired

Unique identifier for the interaction.

statusstringRequired

Status of the interaction: 'pending', 'processing', 'completed', or 'failed'.

post/sessions/{session_id}/exec
Python
from codeset import Codeset

client = Codeset()
response = client.sessions.execute_command(
    session_id="session_id",
    command="command",
)
print(response.interaction_id)
{
  "interaction_id": "text",
  "status": "text"
}

Get Interaction

get

Get interaction details by ID

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
interaction_idstringRequired
session_idstringRequired
Responses
200

Successful Response

application/json
or
or
get/sessions/{session_id}/interactions/{interaction_id}
GET /api/v1/sessions/{session_id}/interactions/{interaction_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "interaction_id": "text",
  "session_id": "text",
  "interaction_type": "exec_command",
  "created_at": "2026-01-01T00:00:00.000Z",
  "exit_code": 1,
  "stdout": "text",
  "stderr": "text",
  "execution_time_seconds": 1,
  "success": true,
  "message": "text",
  "command": "text",
  "command_timeout": 300
}

String Replace

post

Replace a string in a file within the session environment

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
session_idstringRequired
Body

Request to perform string replacement in a file.

file_pathstringRequired

Path to the file where replacement should be performed.

str_to_replacestringRequired

String to be replaced.

str_to_insertstringRequired

String to insert as replacement.

Responses
200

Successful Response

application/json

Response for string replacement operation.

successbooleanRequired

Whether the string replacement was successful.

messagestringRequired

Details about the string replacement operation.

post/sessions/{session_id}/str_replace
Python
from codeset import Codeset

client = Codeset()
response = client.sessions.str_replace(
    session_id="session_id",
    file_path="file_path",
    str_to_insert="str_to_insert",
    str_to_replace="str_to_replace",
)
print(response.message)
{
  "success": true,
  "message": "text"
}

Upload File

post

Upload a file to the session environment

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
session_idstringRequired
Body

Request to upload a file to the session environment.

file_pathstringRequired

Destination path for the file inside the container.

content_base64stringRequired

Base64-encoded file content.

make_executablebooleanOptional

Whether to make the file executable (chmod +x).

Default: false
Responses
200

Successful Response

application/json

Response for file upload operation.

successbooleanRequired

Whether the file upload was successful.

messagestringRequired

Details about the file upload operation.

file_pathstringRequired

Destination path where the file was written.

size_bytesintegerRequired

Size of the uploaded file in bytes.

post/sessions/{session_id}/upload
POST /api/v1/sessions/{session_id}/upload HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "file_path": "text",
  "content_base64": "text",
  "make_executable": false
}
{
  "success": true,
  "message": "text",
  "file_path": "text",
  "size_bytes": 1
}

Start Verification

post

Start verification (oracle) in a session - async

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
session_idstringRequired
Responses
202

Successful Response

application/json

Response for starting verification (async).

job_idstringRequired

Unique identifier for the verification job.

statusstring · enumRequired

Initial status of the verification job.

Possible values:
started_atstring · date-timeRequired

Timestamp when verification started (UTC).

post/sessions/{session_id}/verify
Python
from codeset import Codeset

client = Codeset()
response = client.sessions.verify.start(
    "session_id",
)
print(response.job_id)
{
  "job_id": "text",
  "status": "pending",
  "started_at": "2026-01-01T00:00:00.000Z"
}

Get Verification Job

get

Get a verification job, including the result if it's completed

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
job_idstringRequired
session_idstringRequired
Responses
200

Successful Response

application/json

Represents a single verification job, the core resource of the API.

job_idstringRequired

Unique identifier for the job.

sample_idstringRequired

Identifier of the sample being used for verification.

session_idstringRequired

Session identifier for this job.

statusstring · enumRequired

Current status of the job.

Possible values:
created_atstring · date-timeRequired

Timestamp when the job was created (UTC).

started_atstring · date-time · nullableOptional

Timestamp when the job processing started (UTC).

completed_atstring · date-time · nullableOptional

Timestamp when the job completed (UTC).

resultone of · nullableOptional

The result of the verification. Available when status is 'completed'.

get/sessions/{session_id}/verify/{job_id}
Python
from codeset import Codeset

client = Codeset()
response = client.sessions.verify.status(
    job_id="job_id",
    session_id="session_id",
)
print(response.job_id)
{
  "job_id": "text",
  "sample_id": "text",
  "session_id": "text",
  "status": "pending",
  "created_at": "2026-01-01T00:00:00.000Z",
  "started_at": "2026-01-01T00:00:00.000Z",
  "completed_at": "2026-01-01T00:00:00.000Z",
  "result": {
    "tool": "test_suite",
    "is_success": true,
    "execution_duration_seconds": 1,
    "total": 1,
    "passed": 1,
    "failed": 1,
    "skipped": 1,
    "passes": [],
    "failures": [],
    "skips": [],
    "stdout": "PLACE_HOLDER",
    "stderr": "PLACE_HOLDER"
  },
  "error": {
    "code": "text",
    "message": "text"
  },
  "container_info": {
    "container_name": "text",
    "service_url": "https://example.com",
    "sample_id": "text",
    "status": "text",
    "created_at": "2026-01-01T00:00:00.000Z",
    "expires_at": "2026-01-01T00:00:00.000Z",
    "location": "text"
  }
}

Get User Balance

get

Get user's money balance

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Responses
200

Successful Response

application/json

User's money balance and billing information

user_idstringRequired

User ID

balanceintegerOptional

Current balance in cents

Default: 0
total_depositedintegerOptional

Total money ever deposited in cents

Default: 0
total_spentintegerOptional

Total money ever spent in cents

Default: 0
stripe_customer_idstring · nullableOptional

Stripe customer ID

last_updatedstring · date-timeRequired

Last time balance was updated

get/billing/balance
GET /api/v1/billing/balance HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "user_id": "text",
  "balance": 0,
  "total_deposited": 0,
  "total_spent": 0,
  "stripe_customer_id": "text",
  "last_updated": "2026-01-01T00:00:00.000Z"
}

Get Pricing Info

get

Get current pricing information

Responses
200

Successful Response

application/json
Other propertiesanyOptional
get/billing/pricing
GET /api/v1/billing/pricing HTTP/1.1
Accept: */*
200

Successful Response

{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Deposit Money

post

Create a payment intent for money deposit

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Body

Request to deposit money

amount_centsinteger · min: 100Required

Amount to deposit in cents

currencystringOptional

Currency for payment

Default: usd
Responses
200

Successful Response

application/json

Response for money deposit

checkout_urlstringRequired

Stripe checkout URL for payment

amount_centsintegerRequired

Amount being deposited in cents

currencystringRequired

Currency

post/billing/deposit
POST /api/v1/billing/deposit HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "amount_cents": 1,
  "currency": "usd"
}
{
  "checkout_url": "text",
  "amount_cents": 1,
  "currency": "text"
}

Stripe Webhook

post

Handle Stripe webhook events

Responses
200

Successful Response

application/json
Other propertiesanyOptional
post/billing/webhook
POST /api/v1/billing/webhook HTTP/1.1
Accept: */*
200

Successful Response

{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Get Usage History

get

Get complete usage history for the current user

Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Query parameters
pageinteger · min: 1Optional

Page number (1-based)

Default: 1
limitinteger · min: 1 · max: 100Optional

Items per page (max 100)

Default: 25
start_datestring · date · nullableOptional

Include only transactions on or after this date (UTC).

end_datestring · date · nullableOptional

Include only transactions on or before this date (UTC).

transaction_typesstring[] · nullableOptional

Filter by transaction type(s): deposit, usage, charge, refund, agent_job_usage, agent_job_refund.

max_itemsinteger · min: 1 · max: 10000 · nullableOptional

Max transactions to load (default: all). Ignored when start_date or end_date is set.

Responses
200

Successful Response

application/json

Complete usage history for a user

current_balance_centsintegerRequired

Current balance in cents

total_deposits_centsintegerRequired

Total amount deposited

total_usage_centsintegerRequired

Total amount used

get/billing/usage
GET /api/v1/billing/usage HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "current_balance_cents": 1,
  "total_deposits_cents": 1,
  "total_usage_cents": 1,
  "transactions": [
    {
      "id": "text",
      "type": "deposit",
      "amount_cents": 1,
      "description": "text",
      "created_at": "2026-01-01T00:00:00.000Z",
      "session_id": "text",
      "duration_minutes": 1,
      "job_id": "text"
    }
  ],
  "summary": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "pagination": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

List Agent Jobs

get
Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Query parameters
limitinteger · min: 1 · max: 100OptionalDefault: 20
cursorstring · nullableOptional
Responses
200

Successful Response

application/json
Other propertiesanyOptional
get/agent-jobs
GET /api/v1/agent-jobs HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Create Agent Job

post
Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Body
repostringRequired

Repository identifier as owner/repo.

refstring · nullableOptional

Optional ref or branch.

agent_idstringRequired

Agent type (e.g. cursor).

Responses
202

Successful Response

application/json
Other propertiesanyOptional
post/agent-jobs
POST /api/v1/agent-jobs HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "repo": "text",
  "ref": "text",
  "agent_id": "text"
}
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Get Agent Job

get
Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
job_idstringRequired
Responses
200

Successful Response

application/json
Other propertiesanyOptional
get/agent-jobs/{job_id}
GET /api/v1/agent-jobs/{job_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Agent Job Completion

post
Path parameters
job_idstringRequired
Body
secretstringRequired

Must match the job's completion_secret.

outcomestring · enumRequiredPossible values:
error_messagestring · nullableOptional

When outcome is error, stored on the job.

Responses
200

Successful Response

application/json
Other propertiesanyOptional
post/agent-jobs/{job_id}/completion
POST /api/v1/agent-jobs/{job_id}/completion HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "secret": "text",
  "outcome": "completed",
  "error_message": "text"
}
{
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Get Agent Job Result

get
Authorizations
AuthorizationstringRequired

Bearer token for API authentication

Path parameters
job_idstringRequired
Query parameters
agent_idstring[] · nullableOptional
Responses
200

Successful Response

application/json
anyOptional
get/agent-jobs/{job_id}/result
GET /api/v1/agent-jobs/{job_id}/result HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated