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

# Prompt playgrounds

# PromptPlaygroundsClient

`adaline.prompts.playgrounds` reads the playgrounds attached to a prompt — the saved test scenarios with their own messages, variables, and run history.

## Access

```typescript theme={null}
import { Adaline } from '@adaline/client';

const adaline = new Adaline();
const playgrounds = adaline.prompts.playgrounds; // PromptPlaygroundsClient
```

The class is also exported directly:

```typescript theme={null}
import { PromptPlaygroundsClient } from '@adaline/client';
```

Types from `@adaline/api`:

```typescript theme={null}
import type {
  ListPlaygroundsResponse,
  PlaygroundDetail,
} from '@adaline/api';
```

***

## list()

List all playgrounds attached to a prompt.

```typescript theme={null}
list(options: { promptId: string }): Promise<ListPlaygroundsResponse>
```

### Parameters

| Name       | Type     | Required | Description        |
| ---------- | -------- | -------- | ------------------ |
| `promptId` | `string` | Yes      | Prompt identifier. |

### Returns

`Promise<ListPlaygroundsResponse>` with `{ data: Playground[] }`.

### Example

```typescript theme={null}
const { data } = await adaline.prompts.playgrounds.list({
  promptId: 'prompt_abc123',
});

for (const playground of data) {
  console.log(playground.id, playground.title);
}
```

***

## get()

Retrieve a single playground by ID.

```typescript theme={null}
get(options: {
  promptId: string;
  playgroundId: string;
}): Promise<PlaygroundDetail>
```

### Parameters

| Name           | Type     | Required | Description            |
| -------------- | -------- | -------- | ---------------------- |
| `promptId`     | `string` | Yes      | Prompt identifier.     |
| `playgroundId` | `string` | Yes      | Playground identifier. |

### Returns

`Promise<PlaygroundDetail>` — the full playground with its messages, variables, and recent runs.

### Example

```typescript theme={null}
const playground = await adaline.prompts.playgrounds.get({
  promptId: 'prompt_abc123',
  playgroundId: 'playground_xyz789',
});

console.log(playground.variables);
```

***

## See Also

* [PromptsClient](/docs/reference/sdk/v2/typescript/classes/prompts) — parent client
* API reference: [List playgrounds](/docs/reference/api/v2/openapi/list-playgrounds) · [Get playground](/docs/reference/api/v2/openapi/get-playground)
