All Integrations

Cursor Integration

Use NextAPI from Cursor through the standard REST API. This page describes the verified create-and-poll HTTP flow; a packaged NextAPI MCP server is not claimed here.

Configuration

Set the following values in your Cursor configuration:

md
# .cursor/rules/nextapi-video.mdc
When the user asks for AI video generation:
- Read NEXTAPI_KEY from the local environment.
- POST https://api.nextapi.top/v1/videos with Authorization: Bearer $NEXTAPI_KEY.
- Save the returned id.
- Poll GET https://api.nextapi.top/v1/videos/{id}.
- Treat the task as complete only when status = succeeded and output.url or output.video_url exists.

Setup Steps

  1. 1Sign up at app.nextapi.top and create an API key.
  2. 2Store it outside source control, for example in your shell as NEXTAPI_KEY.
  3. 3Add the rule above to your Cursor project so the agent follows the async REST flow.
  4. 4Ask your agent to generate a video and have it run the create request.
  5. 5Have the agent poll by id and return the final URL only after status is succeeded.

Test with cURL

Verify your setup by running this command with your real sk_live_ key:

Sample command — replace $NEXTAPI_KEY with your actual key from app.nextapi.top.
bash
CREATE_RESPONSE=$(curl -sS -X POST https://api.nextapi.top/v1/videos \
  -H "Authorization: Bearer $NEXTAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.0-pro",
    "input": {
      "prompt": "a gentle wave rolling onto a sandy beach",
      "duration_seconds": 6,
      "resolution": "1080p"
    }
  }')

VIDEO_ID=$(printf '%s' "$CREATE_RESPONSE" | jq -r '.id')

curl -sS "https://api.nextapi.top/v1/videos/$VIDEO_ID" \
  -H "Authorization: Bearer $NEXTAPI_KEY"
Do not commit sk_* keys or local Cursor rules containing secrets. For strict setup details, see the third-party tools configuration guide.

Need help?

Contact our integrations team at support@nextapi.top or check the full API documentation.