If you've spent any time on Midjourney or AI art communities, you've probably seen the --sref parameter floating around in prompts. SREF stands for Style Reference — and it's one of the most powerful, underused features in AI image generation.
What Is an SREF Code?
An SREF code is a numeric identifier that tells Midjourney to apply a specific visual aesthetic to your image. Think of it as a style preset: instead of writing lengthy descriptions like "cinematic lighting, muted tones, film grain, shallow depth of field," you just append a single number to your prompt.
Each number maps to a unique aesthetic stored in Midjourney's internal style library. The same code will produce consistent results across different prompts and sessions — which is exactly what makes them so valuable for creators who want repeatable, on-brand outputs.
How Do SREF Codes Work?
To use an SREF code in Midjourney, you add --sref followed by the code number at the end of your prompt:
Midjourney reads the code, pulls the associated aesthetic from its library, and applies that visual style to your generated image — regardless of your text prompt content.
Why Use SREF Codes Instead of Describing Style?
Writing out style descriptions in text is hit-or-miss. Words like "cinematic" or "editorial" are interpreted differently every generation. SREF codes, on the other hand, are deterministic — the same code consistently produces the same aesthetic feel, making your results predictable and shareable.
You can adjust how strongly the sref influences your image using the --sw parameter (style weight). --sw 0 ignores the sref, --sw 1000 applies it at maximum strength. A value of 100 (default) works well for most cases.
Can You Use SREF Codes Without a Midjourney Subscription?
Yes — and this is where it gets exciting. Meta AI (available free on Instagram, Facebook, and meta.ai) has a native integration with Midjourney's style library. You can use --sref codes inside Meta AI's image generator completely free, no subscription required.
This has made SREF codes far more accessible. Millions of creators who can't afford Midjourney's subscription can still access the same visual aesthetics through Meta AI.
Where Do SREF Codes Come From?
Midjourney's style library contains thousands of codes — but most of them are undocumented. You can generate a random one using --sref random, or browse curated lists like the 2,248 codes on MidjourneyCodes, each shown with three sample previews so you know exactly what you're getting before you copy it.
How to Choose the Right SREF Code
The best way is to browse visually. Look at the sample images for each code and pick one that matches the aesthetic you're going for. At MidjourneyCodes, codes are organised into aesthetic categories — Light & Airy, Cinematic, Dark & Moody, Editorial, and Abstract — so you can filter by mood rather than hunting blindly.
Can You Combine Multiple SREF Codes?
Yes. You can blend two styles by adding both codes to the same --sref parameter, separated by a space:
Midjourney will blend both aesthetics. You can also weight them differently using separate --sw values. See our guide on combining SREF codes for full details.
Getting Started
The easiest way to start: browse the free codes on MidjourneyCodes, find one whose sample images match the look you want, copy the --sref command, and paste it into your prompt. You'll immediately see the difference compared to prompting without a style reference.