{
  "version": 1,
  "metadata": {
    "tags": [
      "prefix:xai-images",
      "provider:xai",
      "protocol:xai-images"
    ],
    "name": "xai-images/generates-an-image",
    "recordedAt": "2026-07-19T15:56:20.098Z"
  },
  "interactions": [
    {
      "transport": "http",
      "request": {
        "method": "POST",
        "url": "https://api.x.ai/v1/images/generations",
        "headers": {
          "content-type": "application/json"
        },
        "body": "{\"model\":\"grok-imagine-image\",\"prompt\":\"A simple flat black diamond centered on a plain white background.\",\"aspect_ratio\":\"1:1\",\"resolution\":\"1k\",\"response_format\":\"b64_json\"}"
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/json"
        },
        "body": "{\"data\":[{\"b64_json\":\"[encoded data, 116704 characters]\",\"mime_type\":\"image/jpeg\"}],\"usage\":{\"cost_in_usd_ticks\":200000000}}"
      }
    }
  ]
}
