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

# Extensions

> SDK reference for the Extensions resource (TypeScript & Python)

## Upload Extension

`POST /v1/extensions` — uploadExtension

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Extensions } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Extensions.uploadExtension({
    body: {
      name: 'string',
      file: new File(['file content'], 'file.txt')
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.extensions.upload_extension(
      name="string",
      file=("file.txt", b"file content"),
  )
  print(result)
  ```
</CodeGroup>

## List Extensions

`GET /v1/extensions` — listExtensions

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Extensions } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Extensions.listExtensions();
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.extensions.list_extensions()
  print(result)
  ```
</CodeGroup>

## Get Extension Details

`GET /v1/extensions/{id}` — getExtension

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Extensions } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Extensions.getExtension({
    path: {
      id: 'your-id'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.extensions.get_extension(
      "your-id",
  )
  print(result)
  ```
</CodeGroup>

## Delete Extension

`DELETE /v1/extensions/{id}` — deleteExtension

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Extensions } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const result = await Extensions.deleteExtension({
    path: {
      id: 'your-id'
    }
  });
  console.log(result);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  result = client.extensions.delete_extension(
      "your-id",
  )
  print(result)
  ```
</CodeGroup>
