> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relace.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Clone Repo

> Download all files and content from a repository

## Path Parameters

<ParamField path="repo_id" type="string" required>
  Repo ID
</ParamField>

## Response

<ResponseField name="files" type="array">
  Array of all files in the repository with their complete content

  <Expandable title="properties" defaultOpen={false}>
    <ResponseField name="filename" type="string">
      Path to the file within the repo
    </ResponseField>

    <ResponseField name="content" type="string">
      Full content of the file
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.relace.run/v1/repo/123e4567-e89b-12d3-a456-426614174000/clone \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```typescript TypeScript SDK theme={null}
  import { Relace } from "@relace-ai/relace";

  const client = new Relace({ apiKey: "YOUR_API_KEY" });

  const repoId = "123e4567-e89b-12d3-a456-426614174000";
  const data = await client.repo.clone(repoId);
  console.log(data);
  ```

  ```python Python SDK theme={null}
  from relace import Relace

  client = Relace(api_key = "YOUR_API_KEY")

  repo_id = "123e4567-e89b-12d3-a456-426614174000"
  data = client.repo.clone(repo_id)
  print(data)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "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"
      }
    ]
  }
  ```
</ResponseExample>
