GET
/
v1
/
repo
/
{repo_id}
/
clone
curl -X GET https://api.relace.ai/v1/repo/123e4567-e89b-12d3-a456-426614174000/clone \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "files": [
    {
      "filename": "src/main.py",
      "content": "def main():\n    print('Hello World!')\n\nif __name__ == '__main__':\n    main()"
    },
    {
      "filename": "README.md",
      "content": "# My Project\n\nThis is a sample project."
    },
    {
      "filename": "requirements.txt",
      "content": "requests==2.28.1\nflask==2.2.2"
    }
  ]
}

Path Parameters

repo_id
string
required
Repo ID

Response

files
array
Array of all files in the repository
curl -X GET https://api.relace.ai/v1/repo/123e4567-e89b-12d3-a456-426614174000/clone \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "files": [
    {
      "filename": "src/main.py",
      "content": "def main():\n    print('Hello World!')\n\nif __name__ == '__main__':\n    main()"
    },
    {
      "filename": "README.md",
      "content": "# My Project\n\nThis is a sample project."
    },
    {
      "filename": "requirements.txt",
      "content": "requests==2.28.1\nflask==2.2.2"
    }
  ]
}