HridaSpro Docs

Api Reference

Image Generations

Generate images from a text prompt with OpenAI-compatible endpoints.

API console
POST/v1/images/generations
Bash
curl https://spro.hridaai.com/v1/images/generations \  -H "Content-Type: application/json" \  -H "Authorization: Bearer spro-xxxxxxxxxxxxxxxx" \  -d '{    "model": "openai/gpt-image-1",    "prompt": "A white Siamese cat wearing a tiny wizard hat",    "size": "1024x1024"  }'
JSON
{  "created": 1756968000,  "data": [    {      "url": "https://..."    }  ],  "usage": {    "input_tokens": 12,    "output_tokens": 1056,    "total_tokens": 1068,    "input_tokens_details": {      "image_tokens": 0    }  }}

Generate an image

POST https://spro.hridaai.com/v1/images/generations

Creates an image from a text prompt. OpenAI-compatible — use the OpenAI SDK with the Spro base URL. Streaming is not supported yet.

Request body

ParameterTypeRequiredDescription
modelstringRequiredImage model ID, provider-prefixed — e.g. openai/gpt-image-1.
promptstringRequiredText description of the image to generate.
backgroundstringOptionaltransparent or opaque (supported models only).
moderationstringOptionalModeration strictness — low or auto.
nintegerOptionalNumber of images to generate. Defaults to 1.
output_compressionintegerOptionalCompression level (0–100) for jpeg/webp output.
output_formatstringOptionalpng, jpeg, or webp.
qualitystringOptionalQuality tier — e.g. low, medium, high (gpt-image) or standard, hd (dall-e-3).
sizestringOptionalImage dimensions — e.g. 1024x1024.
userstringOptionalA unique identifier representing your end user.

Guardrails

The prompt goes through input guardrails — a violation with a block action returns 403 Forbidden before the upstream call. Generated images are binary, so output guardrails cannot read them yet; the output pass logs usage only. Usage is billed with a separate image_tokens rate for the image portion of the prompt (see input_tokens_details.image_tokens).

{  "error": {    "message": "Request blocked by guardrail: sensitive_information_disclosure",    "type": "guardrail_block",    "code": "GUARDRAIL_BLOCKED"  }}