Chroma

Chroma is an open-source, 8.9B parameter text-to-image model (based on FLUX.1-schnell) designed for diverse and uncensored content generation, including anime, furry art, and photography.


API

If you're looking for an API, you can choose from your desired programming language.

POST
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 import requests import base64 # Use this function to convert an image file from the filesystem to base64 def image_file_to_base64(image_path): with open(image_path, 'rb') as f: image_data = f.read() return base64.b64encode(image_data).decode('utf-8') # Use this function to fetch an image from a URL and convert it to base64 def image_url_to_base64(image_url): response = requests.get(image_url) image_data = response.content return base64.b64encode(image_data).decode('utf-8') # Use this function to convert a list of image URLs to base64 def image_urls_to_base64(image_urls): return [image_url_to_base64(url) for url in image_urls] api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/chroma" # Request payload data = { "prompt": "Close-up portrait of a young knight in shining armor, holding a sword, set against a medieval castle background, dramatic lighting.", "negative_prompt": "low quality, ugly, deformed, blurry, bad anatomy, distorted, unrealistic", "width": 1024, "height": 1024, "aspect_ratio": "1:1 square 1024x1024", "cfg": 7, "sampler_name": "euler", "scheduler": "beta", "steps": 40, "seed": 123456789, "samples": 1, "image_format": "png", "image_quality": 95, "base64": False } headers = {'x-api-key': api_key} response = requests.post(url, json=data, headers=headers) print(response.content) # The response is the generated image
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Describes the imagery scene; specific details yield rich images. Use for artistic depiction.


negative_promptstr ( default: low quality, ugly, deformed, blurry, bad anatomy, distorted, unrealistic )

Excludes undesirable elements; keeps image focus clear. Useful for professional look.


widthint ( default: 1024 )

Defines image width in pixels; adjust for different display needs.

min : 768,

max : 2048


heightint ( default: 1024 )

Sets image height; balance with width for proper ratio.

min : 768,

max : 2048


aspect_ratioenum:str ( default: 1:1 square 1024x1024 )

Selects image shape; square fits media platforms well.

Allowed values:


cfgfloat ( default: 7 )

Guides prompt adherence; higher values mean more accuracy.

min : 1,

max : 20


sampler_nameenum:str ( default: euler )

Selects image sampling; 'euler' for balanced quality and speed.

Allowed values:


schedulerenum:str ( default: beta )

Manages noise schedule; 'beta' for smooth transitions.

Allowed values:


stepsint ( default: 40 )

Changes denoising steps; more steps for enhanced detail.

min : 10,

max : 75


seedint ( default: 123456789 )

Fixes randomness; set for replicable outcomes.


samplesint ( default: 1 )

Number of images generated; adjust for more options.


image_formatenum:str ( default: png )

Output format choice; 'png' offers high quality.

Allowed values:


image_qualityint ( default: 95 )

Sets image detail level; 95 for fine detail.

min : 1,

max : 100


base64bool ( default: 1 )

Outputs image as base64 string; useful for embedding.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Discovering the Power of the Chroma Model

Chroma is an advanced, 8.9-billion-parameter text-to-image AI model crafted with the FLUX.1-schnell architecture, designed for those seeking to harness the potential of generative AI. Its high-fidelity text-to-image synthesis capabilities allow users to create detailed, imaginative visuals from simple text prompts. Leveraging Chroma's open-source nature enables a broader scope of experimentation and creative freedom.

For developers, Chroma offers the ability to automate and streamline workflows with its efficient and stable architectural enhancements. By integrating the model into existing pipelines through custom scripting or APIs, developers can generate diverse visual assets at scale, thus boosting productivity and innovation. Furthermore, its open-source flexibility invites developers to fine-tune the model on specific datasets, enabling customized solutions tailored to unique business needs.

Creators, such as artists and designers, can expedite project timelines by utilizing Chroma for rapid prototyping and asset generation. Artists can craft vivid media concepts by merely articulating creative ideas in natural language, while marketing teams can use Chroma to generate unique campaign visuals without relying on stock images.

Executives will appreciate Chroma's strategic advantages, including its potential to reduce costs associated with traditional design processes and enhance ROI through innovative visual content creation. Additionally, by facilitating community-driven research, Chroma opens doors for ongoing improvements and benchmarking within the diffusion model landscape.

In summary, Chroma represents a transformational tool in text-to-image generation. By mastering prompt engineering and utilizing quality control processes, users can unlock unprecedented creativity and efficiency across various domains.

Discovering Chroma’s potential begins with mastering prompt engineering and selecting parameters that match your creative goals. Follow these guidelines to generate striking, high-quality images across a range of use cases.

Prompt Engineering
• Be specific and descriptive: “A futuristic city skyline at sunset with neon reflections” yields richer results than “city.”
• Use style cues: mention artists, mediums, lighting, or color palettes (for example, “in the style of Impressionist oil painting”).
• Employ negative prompts to filter out unwanted artifacts (“low quality, blurry, deformed, unrealistic”).

Core Parameters
• Width/Height: Choose between 768–2048 px. For social media, a square (1:1, 1024×1024) works well; for portraits, try 896×1152 (3:4); for landscapes, 1344×768 (16:9).
• CFG Scale: Balances creativity vs. prompt fidelity. Set 5–7 for artistic exploration, 8–12 for photorealism, and up to 15 for maximum adherence on precise concepts.
• Steps: Number of denoising iterations. 20–30 for quick drafts, 40–50 for balanced detail, 60–75 for ultra-fine rendering.
• Sampler:
– “euler” or “euler_a” for speed and good quality
– “heun” or “lms” for smoother results
– “dpmpp_2s_a” or “dpmpp_sde” for highest fidelity
• Scheduler: “karras” or “beta” ensure smooth noise scheduling; “exponential” can yield more stylized textures.
• Seed: Fix a seed for reproducible outputs, or leave blank for random variation.
• Samples: Increase to 3–5 to explore variations in one batch.

Use-Case Recommendations

  1. Photorealism (e-commerce products, architecture):
    – Resolution: 1024×1024
    – CFG: 10–12
    – Steps: 50–60
    – Sampler: dpmpp_2s_a, Scheduler: karras
  2. Illustrative Art (comics, concept art):
    – Resolution: 896×1152 (3:4)
    – CFG: 7–9
    – Steps: 30–40
    – Sampler: heun, Scheduler: exponential
  3. Quick Prototyping (storyboards, mood boards):
    – Resolution: 768×768
    – CFG: 5–6
    – Steps: 20–25
    – Sampler: euler, Scheduler: beta
  4. High-Detail Fine Art (prints, posters):
    – Resolution: 2048×2048
    – CFG: 12–15
    – Steps: 60–75
    – Sampler: dpmpp_sde, Scheduler: karras

Workflow Tips

• Iterate: start with a strong core prompt and refine with additional details or negative terms.
• Batch generation: use multiple samples to compare styles and pick the best.
• Post-processing: minor color correction or upscaling can polish final assets.

By fine-tuning these parameters and iterating on your text prompts, you’ll unlock Chroma’s full creative power and produce visuals tailored to any project.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.