# Playground

The [Playground](https://commonstack.ai/playground) lets you test any model available on Commonstack directly in your browser, without writing code.

{% hint style="info" %}

#### &#x20;**Use the Playground when you are:**

* Testing prompt strategies before integrating into your code
* Comparing model behavior across different parameter settings
* Generating API code snippets with the right configuration
* Doing quick experimentation without setting up an SDK
  {% endhint %}

**Model selection:** Choose from all available models using the dropdown at the top left. Pricing is shown next to the model name (input / output per 1M tokens), along with context window size.

<figure><img src="https://3990761167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8kPcWIXmxCvTTBGhpEt%2Fuploads%2Fr47RuwH034ScRtCMi2qN%2Fimage.png?alt=media&#x26;token=a1a7b7aa-055e-4432-974f-378127a0291e" alt=""><figcaption></figcaption></figure>

**System prompt:** Set a system prompt to guide model behavior for your session.

**Parameter tuning:** Adjust generation parameters with interactive sliders:

* **Temperature** (0-2): Controls randomness. Lower values produce more focused output.
* **Max Tokens**: Maximum number of tokens in the response.
* **Top K**: Limits sampling to the top K most likely tokens.
* **Top P**: Nucleus sampling threshold.

{% hint style="success" %}

#### **API code snippet**

Click the "API Code Snippet" button at the bottom of the settings panel to get a ready-to-use code snippet with your current model and parameter settings. You can copy and paste this directly into your application.
{% endhint %}

<figure><img src="https://3990761167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8kPcWIXmxCvTTBGhpEt%2Fuploads%2FLCQTLs4A2Bv64XahUmd0%2Fimage.png?alt=media&#x26;token=fd7132d6-13d6-4def-b16f-cdd038e051ea" alt=""><figcaption></figcaption></figure>

**Conversation interface:** Chat with the model in real time. The interface supports multi-turn conversations, with suggested prompts to get started.

**Model detail:** Click "Model Detail" at the top to view full model specifications. You can also compare models side by side before making a decision on which one to use.

<figure><img src="https://3990761167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8kPcWIXmxCvTTBGhpEt%2Fuploads%2Fl5hgiDzpP3oX9THJhi6x%2Fimage.png?alt=media&#x26;token=d0bacb76-9ea5-4ba7-8b2e-d83570f9442b" alt=""><figcaption></figcaption></figure>
