Cloud Agents API POST /v0/agents

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

POST /v0/agents consistently returns HTTP 500 with body {“code”:“internal”,“message”:“Error”} for a valid authenticated account, valid repository access, and valid model IDs.
This happens even when using model: “default” and when omitting the model field entirely.

Steps to Reproduce

Set CURSOR_API_KEY for an account with Cloud Agents access.
Confirm auth and access:
GET /v0/models returns valid models (includes composer-1.5, gpt-5.3-codex-high, gpt-5.4-high, claude-4.6-opus-high-thinking)
GET /v0/repositories returns https://github.com/Dren-prog/BenchmarkLab
Launch agent with valid payload:
source.repository = “https://github.com/Dren-prog/BenchmarkLab
source.ref = “main”
target.autoCreatePr = false
prompt.text = “…”
test with:
model = “composer-1.5”
model = “default”
model omitted
Observe POST /v0/agents response.

Expected Behavior

Agent should be created successfully and return an id so status polling/conversation retrieval can continue.

Operating System

Windows 10/11

Version Information

Version: 2.5.17 (system setup)
VSCode Version: 1.105.1
Commit: 7b98dcb824ea96c9c62362a5e80dbf0d1aae4770
Date: 2026-02-17T05:58:33.110Z
Build Type: Stable
Release Track: Default
Electron: 39.3.0
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

composer-1.5
default
omitted model field (API default routing)

For AI issues: add Request ID with privacy disabled

Not available from current API error body ({“code”:“internal”,“message”:“Error”}) and no request-id header exposed in current script output.
If required, I can rerun with verbose header capture to collect it.

Additional Information

Additional Information
Payload is valid JSON and matches API structure (prompt, source, target, optional model).
Auth method uses Basic auth with API_KEY: and Content-Type: application/json.
Repository is confirmed accessible via GET /v0/repositories.
Model IDs are confirmed via GET /v0/models.
Error reproduces across multiple launch variants, indicating likely server-side issue.
Repro artifacts:
Benchmarks/RustModel/outputs/cursorapi_default_20260311_220747/summary.json
Benchmarks/RustModel/outputs/cursorapi_default_20260311_220747/per_task.jsonl
Benchmarks/RustModel/outputs/cursorapi_default_20260311_220747/final_report.md

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report.

A similar issue came up recently. It turned out that the Cloud Agents API needs a separate API key. You don’t create it in the general settings. Instead, go to:

Dashboard > Cloud Agents https://cursor.com/dashboard?tab=cloud-agents > My Settings > scroll down to API Keys

Regular dashboard API keys might work for GET endpoints like /v0/models and /v0/repositories, but POST /v0/agents requires an agent-specific key. Here’s a thread with the same error: Internal error from cloud agents api

If your key is already from there, send the full curl request (without the key, of course) so I can check the payload structure. Endpoint docs: Cloud Agents API | Cursor Docs

Let me know how it goes.

Hi Dean,

Thanks for the answer.

I had already the API Key as you explain.

Please find the curl :

curl --request POST
–url https://api.cursor.com/v0/agents
-u “<CURSOR_API_KEY>:”
–header “Content-Type: application/json”
–data ‘{
“prompt”: {
“text”: “You are a senior Rust engineer. Return only valid Rust code for the required function. Do not include explanations.\n\nBenchmark: RustEvo2\nCondition: base\nTask ID: rustevo2_1001\nQuery:\nClone source into target while preserving allocation reuse behavior.\nFunction signature:\nfn sync_vec<T: Clone>(target: &mut Vec, source: &[T])\nConstraints:\n- Use stable Rust unless task explicitly requires otherwise.\n- Avoid unwrap/expect in production-style code.\n- Keep output strictly as compilable Rust code.”
},
“source”: {
“ref”: “main”,
“repository”: “https://github.com/Dren-prog/BenchmarkLab”
},
“target”: {
“autoCreatePr”: false
},
“model”: “default”
}’

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.