Google Slides createImage with a Sume URL: use PNG or JPEG

CreateImageRequest takes PNG, JPEG or GIF, up to 50 MB and 25 megapixels, from a public URL of 2 KB or less. Ask Sume for output_format png or jpeg, not WebP.

5 min readSume
All posts

Request output_format png or jpeg from Sume and pass the data[0].url to a createImage request. The Slides API's request reference says a CreateImageRequest accepts PNG, JPEG or GIF, under 50 MB and at most 25 megapixels, with a URL up to 2 KB that must be publicly accessible. WebP is not on that list, and WebP is a value Sume's image API can return, so pin the format yourself.

The same page says the image is fetched once, at insertion. That fits a hosted URL: Slides retrieves the file when your batchUpdate runs, so the URL has to work at that moment.

Do Sume images fit the limits?

Limits from the Google Slides API requests reference, read 2026-10-05; Sume column from Sume's image docs.
Slides limitValueSume side
File typesPNG, JPEG, GIFRequest output_format png or jpeg
File sizeUnder 50 MBOrdinary generated stills are far below it
Pixel countAt most 25 megapixelsA 4K GPT custom size is 8,294,400 px at most
URL lengthUp to 2 KBSume returns a short hosted data[].url
AccessPublicly accessibleThe URL is hosted, not a signed upload

The batchUpdate body

Send this to POST https://slides.googleapis.com/v1/presentations/{presentationId}:batchUpdate with an OAuth token that has Slides access. Replace the page id and the URL with the values from your deck and from the Sume response.

{
  "requests": [
    {
      "createImage": {
        "url": "https://media.sume.com/img/EXAMPLE/0.png",
        "elementProperties": {
          "pageObjectId": "p1",
          "size": {
            "width": { "magnitude": 4000000, "unit": "EMU" },
            "height": { "magnitude": 4000000, "unit": "EMU" }
          }
        }
      }
    }
  ]
}

Where do the two APIs meet badly?

The Sume call waits at most 30 seconds, so a Slides script that generates and inserts in one run should check the status first. A 200 has the URL; a 202 does not, and the image comes later from the job result. The jobs guide says to poll status_url and never to resubmit.

Keep the deck's quota in mind as well: each slide you fill is one generation billed to your Sume workspace. Use quality: "low" while you lay the deck out, then regenerate the few slides that matter. The usage.cost on every 200 response gives the USD amount for that call.

Last, remember that an inserted image is a snapshot: the page says Slides fetches the URL once, so regenerating an image in Sume later does not update a slide that already holds the old one. To swap a picture, send a new createImage and delete the old element in the same batchUpdate.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume