# Random Seed

The seed parameter controls the randomness of model outputs. Here is how it works across the Segmind platform:

## Seed Behavior

| Seed Value                                     | Behavior                                                                                                                       |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **`-1`**                                       | The system generates a random seed automatically. The random seed used is returned in the response header for reproducibility. |
| **Any positive integer** (e.g., `42`, `12345`) | Deterministic output. Using the same seed with identical parameters will produce the same result.                              |
| **Omitted / not provided**                     | Behavior is model-dependent. Most models will treat this as random, but some may use a model-specific default.                 |

{% hint style="info" %}
**Important:** Some model documentation pages may show a default seed value (e.g., `12345`) in the API parameter list. This is a placeholder example, not the actual default used when the parameter is omitted. To guarantee random results every time, explicitly set `seed: -1` in your request.
{% endhint %}

## When to Use

* **For consistent, reproducible outputs:** Provide a specific seed value (e.g., `seed: 42`). The same prompt + seed + parameters will produce the same output.
* **For varied results each time:** Set `seed: -1` to explicitly request random generation.
* **For A/B testing or debugging:** Use a fixed seed to isolate the effect of other parameter changes.

This approach works across model APIs, model playground (UI), PixelFlow UI, and PixelFlow APIs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.segmind.com/api-reference/random-seed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
