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": {}
}Initialize the sandbox with github-specific data following the defined schema.
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": {}
}Your Klavis AI API key.
The unique sandbox identifier
Complete GitHub sandbox data structure
List of repositories
Show child attributes
Repository name
Repository description
List of branches with their folder structures
Show child attributes
Branch name
Root folder structure for this branch
Show child attributes
Folder name
Folder path within the repository
Subfolders within this folder
List of pull requests
Show child attributes
Pull request title
Head branch name
PR ID (read-only, set by GitHub)
Pull request description/body
PR state: open, closed, or merged
Base branch name
List of label names
List of issues
Show child attributes
Successful Response
Response model for sandbox initialization