Skip to main content

Quick Start

Get started with Segmind in under 2 minutes:
from portkey_ai import Portkey

# 1. Install: pip install portkey-ai
# 2. Add @segmind provider in model catalog
# 3. Use it:

portkey = Portkey(api_key="PORTKEY_API_KEY")

response = portkey.chat.completions.create(
    model="@segmind/sdxl1.0-txt2img",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)

Add Provider in Model Catalog

Before making requests, add Segmind to your Model Catalog:
  1. Go to Model Catalog → Add Provider
  2. Select Segmind
  3. Enter your Segmind API key
  4. Name your provider (e.g., segmind)

Complete Setup Guide

See all setup options and detailed configuration instructions

Supported Models

Segmind provides fast, serverless access to various Stable Diffusion models:
ModelDescription
sdxl1.0-txt2imgStable Diffusion XL
sd1.5-dreamshaperDream Shaper
sd1.5-realisticvisionRealistic Vision
sd1.5-juggernautJuggernaut
sd1.5-epicrealismEpic Realism
kandinsky2.2-txt2imgKandinsky
qrsd1.5-txt2imgQR Code Generator
And 20+ more models. Check Segmind’s documentation for the complete list.
Portkey uses the OpenAI image generation signature for Segmind, allowing you to easily switch between providers.

Next Steps

For complete SDK documentation:

SDK Reference

Complete Portkey SDK documentation