HyprLab Docs
  • GETTING STARTED
    • Introduction
    • Authentication
    • Making requests
  • BROWSE MODELS
    • Model List
      • OpenAI
        • AUDIO
        • CHAT
        • EMBEDDINGS
        • IMAGE
        • TEXT
        • MODERATION
      • Anthropic
      • Google
        • AUDIO
        • CHAT
          • OpenAI-Format
          • Google-Format
        • IMAGE
        • VIDEO
      • DeepSeek
      • x.AI
        • CHAT
        • IMAGE
      • Cohere
      • Meta AI
      • Qwen
      • Microsoft
      • Mistral AI
      • Perplexity AI
      • Cognitive Computations
      • Nvidia
      • Nous Research
      • MiniMax
      • Amazon
      • AI21-Labs
      • Reka AI
      • Black Forest Labs
      • Stability AI
        • Stable Diffusion 3.5
        • Stable Diffusion 3 - Ultra
        • Stable Diffusion 3 - Core
        • Stable Diffusion 3
        • Stable Diffusion XL 1.0
      • Recraft AI
      • Ideogram AI
      • Kling AI
      • Luma AI
      • Free-GPT
  • Playground
    • HyprLab Studio
    • HyprLab Chat
    • HyprLab - SillyTavern
  • INTEGRATION
    • Basic Setup
      • SillyTavern
      • Janitor AI
      • Risu AI
      • Agnai Chat
      • TypingMind
      • ChatWaifu - Steam
Powered by GitBook
On this page
  1. BROWSE MODELS
  2. Model List
  3. x.AI

IMAGE

PreviousCHATNextCohere

Last updated 1 month ago

Base-Path:

https://api.hyprlab.io/v1

Image Path:

https://api.hyprlab.io/v1/images/generations

Making Request:

curl https://api.hyprlab.io/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -d '{
    "model": "grok-2-image",
    "prompt": "A cute cat",
    "response_format": "url",
  }'
import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: "<HYPRLAB_API_KEY>",
  baseURL: "https://api.hyprlab.io/v1",
});

async function main() {
  const image = await openai.images.generate({
    model: "grok-2-image",
    prompt: "A cute cat",
    response_format: "url",
  });

  console.log(image.data);
}
main();
from openai import OpenAI

client = OpenAI(
    api_key="<HYPRLAB_API_KEY>",
    base_url="https://api.hyprlab.io/v1",
)

client.images.generate(
  model="grok-2-image",
  prompt="A cute cat",
  response_format="url",
)

SEE MORE:


🖼️ Image Models


Model Name:
Discount:
Price:
  • grok-2-image

  • 50% off

  • $0.035 / Image

https://docs.x.ai/docs/guides/image-generations#image-generations
Page cover image