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. |
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.
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: -1to 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.