HridaSpro Docs

Api Reference

Image Edits

Edit source images given a prompt, with an optional mask.

API console
POST/v1/images/edits
Bash
curl https://spro.hridaai.com/v1/images/edits \  -H "Content-Type: application/json" \  -H "Authorization: Bearer spro-xxxxxxxxxxxxxxxx" \  -d '{    "model": "openai/gpt-image-1",    "prompt": "Make the background a sunset beach",    "images": [      {"image_url": "https://example.com/cat.png"}    ],    "input_fidelity": "high"  }'
JSON
{  "created": 1756968000,  "data": [    {      "url": "https://..."    }  ],  "usage": {    "input_tokens": 1240,    "output_tokens": 1056,    "total_tokens": 2296,    "input_tokens_details": {      "image_tokens": 1180    }  }}

Edit an image

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

Edits one or more source images given a prompt. Accepts the JSON body format — reference source images by file_id or image_url, with an optional mask. Streaming is not supported yet.

Request body

ParameterTypeRequiredDescription
modelstringRequiredImage model ID, provider-prefixed.
promptstringRequiredText describing the edit.
imagesarrayRequiredSource images — each as { "file_id": "..." } or { "image_url": "..." }.
maskobjectOptionalMask indicating the area to edit (same reference format).
input_fidelitystringOptionallow or high — how closely the output preserves the source image details.
nintegerOptionalNumber of edited images to generate.
qualitystringOptionalQuality tier.
sizestringOptionalImage dimensions.
userstringOptionalA unique identifier representing your end user.

Sampling parameters (temperature, top_p, penalties) are stripped before the upstream call.

Guardrails

The edit prompt goes through input guardrails — a violation with a block action returns 403 Forbidden before the upstream call. Edited 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"  }}