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

# Creating Datasets

> Create a new internal dataset

<Warning>Using the API directly is not recommended for most users. Instead, we recommend using the [Python SDK](/python-sdk/setup).</Warning>

Create a new internal dataset.

## Headers

<ParamField header="Authorization" type="string" required>
  Your Sutro API key using Key authentication scheme.

  Format: `Key YOUR_API_KEY`

  Example: `Authorization: Key sk_live_abc123...`
</ParamField>

## Response

A JSON object containing the dataset ID.

<ResponseField name="dataset_id" type="string">
  The unique identifier for the created dataset
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "dataset_id": "ds_abc123xyz"
  }
  ```
</ResponseExample>

## Code Examples

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.sutro.sh/create-dataset',
      headers={
          'Authorization': 'Key YOUR_SUTRO_API_KEY',
          'Accept': 'application/json'
      }
  )

  result = response.json()
  print(f"Dataset created: {result['dataset_id']}")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.sutro.sh/create-dataset', {
    method: 'GET',
    headers: {
      'Authorization': 'Key YOUR_SUTRO_API_KEY',
      'Accept': 'application/json'
    }
  });

  const result = await response.json();
  console.log(`Dataset created: ${result.dataset_id}`);
  ```

  ```curl cURL theme={null}
  curl -X GET https://api.sutro.sh/create-dataset \
    -H "Authorization: Key YOUR_SUTRO_API_KEY" \
    -H "Accept: application/json"
  ```
</CodeGroup>
