Cursor Cloud Agent API Prompt with Image is NOT Working

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

In the Cursor Agent API shown in the docs here Lauching an Agent is not working with images. See docs (Cloud Agents API | Cursor Docs) In the payload that we send to the API the image agent works on our repository on GitHub, and there are no issues. However, adding image field with a base64 format gets stuck and only returns this → We are having difficulties reaching the AI provider. Retrying automatically… The payload that we send looks like this:
“”"
[CursorAgent] Request body: {

“prompt”: {

"text": "# SYSTEM INSTRUCTIONS\n## Role\nYou are a code generation agent for \"XYZ Website\" (nextjs).\n\n## Language + Scope\n- Use the user's language for ALL user-facing text.\n- Change ONLY what the user asked to change.\n\n## Rules\n- No Payload CMS imports.\n- No hardcoded English (match user language).\n- No duplicate data-cm-id.\n- No placeholder/example external image URLs.\n\n---\n\n---\n\n## USER REQUEST\n\nUse the image as a reference to create on yourself with html in the main landing page under footer",

"images": [

  {

    "data": "PHN2ZyBoZWlnaHQ9IjFlbSIgc3R5bGU9ImZsZXg6bm9uZTtsaW5lLWhlaWdodDoxIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxZW0iIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkNsYXVkZTwvdGl0bGU+PHBhdGggZD0iTTQuNzA5IDE1Ljk1NWw0LjcyLTIuNjQ3LjA4LS4yMy0uMDgtLjEyOEg5LjJsLS43OS0uMDQ4LTIuNjk4LS4wNzMtMi4zMzktLjA5Ny0yLjI2Ni0uMTIyLS41NzEtLjEyMUwwIDExLjc4NGwuMDU1LS4zNTIuNDgtLjMyMS42ODYuMDYgMS41Mi4xMDMgMi4yNzguMTU4IDEuNjUyLjA5NyAyLjQ0OS4yNTVoLjM4OWwuMDU1LS4xNTctLjEzNC0uMDk4LS4xMDMtLjA5Ny0yLjM1OC0xLjU5Ni0yLjU1Mi0xLjY4OC0xLjMzNi0uOTcyLS43MjQtLjQ5MS0uMzY0LS40NjItLjE1OC0xLjAwOC42NTYtL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MS42NTctLjg1MS0uNzQ3LTEuOTI2LTEuNjJoLS4xMjh2LjE3bC40NDQuNjQ5IDIuMzQ1IDMuNTIxLjEyMiAxLjA4LS4xNy4zNTMtLjYwOC4yMTMtLjY2OC0uMTIyLTEuMzc0LTEuOTI1LTEuNDE1LTIuMTY3LTEuMTQzLTEuOTQzLS4xNC4wOC0uNjc0IDcuMjU0LS4zMTYuMzctLjcyOS4yOC0uNjA3LS40NjEtLjMyMi0uNzQ3LjMyMi0xLjQ3Ni4zODktMS45MjQuMzE1LTEuNTMuMjg2LTEuOS4xNy0uNjMyLS4wMTItLjA0Mi0uMTQuMDE4LTEuNDM0IDEuOTY3LTIuMTggMi45NDUtMS43MjYgMS44NDUtLjQxNC4xNjQtLjcxNy0uMzcuMDY3LS42NjIuNDAxLS41ODkgMi4zODgtMy4wMzYgMS40NC0xLjg4Mi45My0xLjA4Ni0uMDA2LS4xNThoLS4wNTVMNC4xMzIgMTguNTZsLTEuMTMuMTQ2LS40ODctLjQ1Ni4wNjEtLjc0Ni4yMzEtLjI0MyAxLjkwOC0xLjMxMi0uMDA2LjAwNnoiIGZpbGw9IiNEOTc3NTciIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPjwvc3ZnPg==",

    "dimension": {

      "width": 16,

      "height": 16

    }

  }

]

},

“source”: {

"repository": "our_repo_name",

"ref": "main"

},

“target”: {

"branchName": "draft",

"autoCreatePr": false

},

“model”: “claude-4.6-opus-high-thinking”

}

“”"

Without prompt.images, everything works well. I cannot find the problem. Base64 image is also correct because I used a Base64 to image converter to check if the data is correct, and it is indeed.

Steps to Reproduce

Use the Cursor Cloud Agent; Launch an Agent endpoint with a base64 image with a Claude model or others, I tried Gemini, Codex, etc and send a request to the endpoint to see what is the outcome is.

Expected Behavior

The agent should run in the remote github repository and code.

Operating System

MacOS

Version Information

It is Cursor Cloud Agent Endpoint

For AI issues: which model did you use?

claude-4.6-opus-high-thinking

For AI issues: add Request ID with privacy disabled

https://cursor.com/agents/bc-75096fd8-bca4-4dfb-bc0f-8d926af0e627?id=bc-75096fd8-bca4-4dfb-bc0f-8d926af0e627

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hi @Baris, thanks for the detailed report!

The issue is that your base64 image data is an SVG file (XML text), not a raster image. The prompt.images field requires raster formats - PNG, JPEG, GIF, or WebP - since those are what the underlying AI models support.

I reproduced this with the Cloud Agent API: SVG images with an explicit model parameter cause the agent to get stuck in a retry loop (the “difficulties reaching the AI provider” error you’re seeing). The same request with a PNG image works fine.

To fix this, convert your SVG to PNG before base64-encoding it, then pass that as the image data.

We’ll also work on making this clearer in the product. I’ve passed that feedback along to the team.

Docs reference: Cloud Agents API - Launch an Agent

Dear Sanjeed,

Thank you for your fast reply. Finally, figured it out, as all my images were .svg format. I’ll be using other format types you mentioned.

Have a nice day.

2 Likes