Skip to main content
POST
/
sandbox
/
github
/
{sandbox_id}
/
initialize
Initialize github sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/github/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repos": [
    {
      "name": "<string>",
      "description": "<string>",
      "branches": [
        {
          "name": "<string>",
          "folders": {
            "name": "<string>",
            "path": "<string>",
            "files": [
              {
                "name": "<string>",
                "path": "<string>",
                "content": "<string>"
              }
            ],
            "folders": [
              "<unknown>"
            ]
          }
        }
      ],
      "prs": [
        {
          "title": "<string>",
          "head": "<string>",
          "id": 123,
          "body": "<string>",
          "state": "open",
          "base": "main",
          "labels": [
            "<string>"
          ]
        }
      ],
      "issues": [
        {
          "title": "<string>",
          "id": 123,
          "body": "<string>",
          "state": "open",
          "labels": [
            "<string>"
          ]
        }
      ]
    }
  ]
}
'
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Body

application/json

Complete GitHub sandbox data structure

repos
GitHubRepo · object[] | null

List of repositories

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type