GET

/v1/schemas/grok/image/v1/images/edits?kind=output

kind outputactivity imagehash 543f212b…extracted Aug 9, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.
Source trace
8f60142721133fcd65222c2325429f56d177da75862552e37c7ba4a6f380ee92
{
  "fetchedAt": 1786251680,
  "extractorVersion": "1",
  "verifiedAt": null
}

Response body

2 properties · 1 required · 5 $defs
propertytypedescriptionconstraints
data*GeneratedImage[]A list of generated image objects.
usageMediaUsageBilling and cost information for this request.nullable

Types

5 $defs

FileOutputobject

Information about a generated file stored in the Files API.

expires_atanyUnix timestamp (seconds) when the stored file expires and will be automatically deleted. Only present when the file has an expiration.format: int64
file_id*stringFiles API file_id of the stored file.
filename*stringFilename of the stored file.
public_urlanyPublic URL for the stored file. Only present when the request included `storage_options.public_url` and creation succeeded.
public_url_erroranyHuman-readable error when `storage_options.public_url` was set but public URL creation failed. The file was stored successfully.
public_url_expires_atanyUnix 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_jsonanyA 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_outputFileOutputStorage info for the generated image. Only present when the request included a `storage_options` configuration and the upload succeeded.nullable
mime_typeanyThe MIME type of the generated image (e.g. `image/png`, `image/jpeg`, `image/webp`).
storage_erroranyHuman-readable error when `storage_options` was set but the upload failed. Absent on success or when storage was not requested.
urlanyA 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*integerText tokens served from cache from previous requests (a subset of `text_tokens`).format: int32
image_tokens*integerInput image tokens, as reported by the image engine.format: int32
text_tokens*integerPrompt 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*integerGenerated image tokens, as reported by the image engine.format: int32
reasoning_tokens*integerReasoning (thinking) tokens generated by the prompt-rewriting (upsampler) LLM.format: int32
text_tokens*integerRewritten-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*integerThe 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_tokensanyTotal 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_detailsMediaInputTokensDetailsBreakdown of `input_tokens`.nullable
output_tokensanyTotal output tokens: rewritten-prompt text tokens + reasoning tokens + generated image tokens (the sum of `output_tokens_details`).format: int32
output_tokens_detailsMediaOutputTokensDetailsBreakdown of `output_tokens`.nullable
total_tokensanyTotal tokens (input + output).format: int32

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"grok","endpointId":"v1/images/edits","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}