Page cover

GROK-2-IMAGE

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",
  }'
chevron-right📌 Request Body Documentationhashtag

prompt (string, required)

  • Description: Main text input to guide the generation process.

  • Validation:

    • Must be a non-empty string.

    • Must not exceed 10,000 characters.

response_format (string, optional)

  • Description: Defines how the response data is formatted.

  • Validation:

    • Must be either url or b64_json.

output_format (string, optional)

  • Description: Specifies the format of the output image.

  • Validation:

    • Must be one of the following formats:

      • png

      • jpeg

      • webp


Pricing Details


Model Name:
  • grok-2-image

Discount:
  • 10% off

Price:
  • $0.063 / Image

Last updated