GET
/v1/schemas/grok/image/v1/images/edits?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above.Source trace8f60142721133fcd65222c2325429f56d177da75862552e37c7ba4a6f380ee92{
"fetchedAt": 1786251680,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
2 properties · 1 required · 5 $defs| property | type | description | constraints |
|---|---|---|---|
| data* | GeneratedImage[] | A list of generated image objects. | |
| usage | MediaUsage | Billing and cost information for this request. | nullable |
Types
5 $defsFileOutputobject
Information about a generated file stored in the Files API.
| expires_at | any | Unix timestamp (seconds) when the stored file expires and will be automatically deleted. Only present when the file has an expiration. | format: int64 |
| file_id* | string | Files API file_id of the stored file. | |
| filename* | string | Filename of the stored file. | |
| public_url | any | Public URL for the stored file. Only present when the request included `storage_options.public_url` and creation succeeded. | |
| public_url_error | any | Human-readable error when `storage_options.public_url` was set but public URL creation failed. The file was stored successfully. | |
| public_url_expires_at | any | Unix timestamp (seconds) when the public URL expires. Present when the public URL has an expiry, either from an explicit `expires_after` in the request or inherited from the file's TTL. | format: int64 |
GeneratedImageobject
Generated images
| b64_json | any | A base64-encoded string representation of the generated image (without the data-URI prefix), if `b64_json` is specified as `response_format` in the request. | |
| file_output | FileOutput | Storage info for the generated image. Only present when the request included a `storage_options` configuration and the upload succeeded. | nullable |
| mime_type | any | The MIME type of the generated image (e.g. `image/png`, `image/jpeg`, `image/webp`). | |
| storage_error | any | Human-readable error when `storage_options` was set but the upload failed. Absent on success or when storage was not requested. | |
| url | any | A url to the generated image, if `response_format` is not specified or with `url` in the request. |
MediaInputTokensDetailsobject
Breakdown of media generation input tokens.
| cached_tokens* | integer | Text tokens served from cache from previous requests (a subset of `text_tokens`). | format: int32 |
| image_tokens* | integer | Input image tokens, as reported by the image engine. | format: int32 |
| text_tokens* | integer | Prompt text tokens consumed by the prompt-rewriting (upsampler) LLM, including any served from cache. | format: int32 |
MediaOutputTokensDetailsobject
Breakdown of media generation output tokens.
| image_tokens* | integer | Generated image tokens, as reported by the image engine. | format: int32 |
| reasoning_tokens* | integer | Reasoning (thinking) tokens generated by the prompt-rewriting (upsampler) LLM. | format: int32 |
| text_tokens* | integer | Rewritten-prompt text tokens generated by the prompt-rewriting (upsampler) LLM, excluding reasoning tokens. | format: int32 |
MediaUsageobject
Billing and cost information for media generation requests (image and video).
| cost_in_usd_ticks* | integer | The cost of this request expressed in USD ticks. One USD cent equals 100,000,000 ticks, so one US dollar equals 10,000,000,000 ticks. | format: int64 |
| input_tokens | any | Total input tokens: prompt text tokens + input image tokens (the sum of `input_tokens_details`, where `cached_tokens` is a subset of `text_tokens`, not additive). | format: int32 |
| input_tokens_details | MediaInputTokensDetails | Breakdown of `input_tokens`. | nullable |
| output_tokens | any | Total output tokens: rewritten-prompt text tokens + reasoning tokens + generated image tokens (the sum of `output_tokens_details`). | format: int32 |
| output_tokens_details | MediaOutputTokensDetails | Breakdown of `output_tokens`. | nullable |
| total_tokens | any | Total tokens (input + output). | format: int32 |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"grok","endpointId":"v1/images/edits","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}