> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.ideogram.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.ideogram.ai/_mcp/server.

# List datasets

GET https://api.ideogram.ai/datasets

Lists datasets for the authenticated user, most recently updated first. Supports an optional case-insensitive name search.


Reference: https://developer.ideogram.ai/v1/api-reference/custom-model-training/list-datasets

## Authentication

- `Api-Key` header (required) — API key for access control. Use in the header with the name \"Api-Key\"

## Request

### Query parameters

- `search` (string, optional) — Case-insensitive substring to match against dataset names. When omitted, datasets are not filtered by name.

## Response

### 200

Datasets retrieved successfully

- `datasets` (list of Dataset, required) — Matching datasets, most recently updated first.

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

## Types

### Dataset

A dataset for organizing training images.

- `dataset_id` (string, required) — Unique identifier for the dataset.
- `name` (string, required) — Display name of the dataset.
- `user_id` (string, required) — ID of the user who owns this dataset.
- `creation_time` (datetime, required) — When the dataset was created.

## Examples

**Response**

```json
{
  "datasets": [
    {
      "dataset_id": "dataset_id",
      "name": "name",
      "user_id": "user_id",
      "creation_time": "2024-01-15T09:30:00Z"
    },
    {
      "dataset_id": "dataset_id",
      "name": "name",
      "user_id": "user_id",
      "creation_time": "2024-01-15T09:30:00Z"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.ideogram.ai/datasets"

headers = {"Api-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.ideogram.ai/datasets';
const options = {method: 'GET', headers: {'Api-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ideogram.ai/datasets"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.ideogram.ai/datasets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.ideogram.ai/datasets")
  .header("Api-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.ideogram.ai/datasets', [
  'headers' => [
    'Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.ideogram.ai/datasets");
var request = new RestRequest(Method.GET);
request.AddHeader("Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Api-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ideogram.ai/datasets")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```