All Integrations

n8n Integration

Add AI video generation to your n8n automation workflows using the built-in HTTP Request node. This integration uses NextAPI's standard REST API — no custom nodes required.

Configuration

Set the following values in your n8n configuration:

json
// n8n HTTP Request Node Configuration
{
  "createVideo": {
    "method": "POST",
    "url": "https://api.nextapi.top/v1/videos",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "headerAuth": {
      "name": "Authorization",
      "value": "Bearer {{ $credentials.nextapiKey }}"
    },
    "sendBody": true,
    "bodyContentType": "json",
    "jsonBody": {
      "model": "seedance-2.0-pro",
      "input": {
        "prompt": "={{ $json.prompt }}",
        "duration_seconds": 6,
        "resolution": "1080p"
      }
    }
  },
  "pollVideo": {
    "method": "GET",
    "url": "={{ 'https://api.nextapi.top/v1/videos/' + $json.id }}",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "headerAuth": {
      "name": "Authorization",
      "value": "Bearer {{ $credentials.nextapiKey }}"
    }
  }
}

Setup Steps

  1. 1In n8n, go to Settings > Credentials and create a new "Header Auth" credential with your NextAPI key.
  2. 2Add an HTTP Request node to your workflow.
  3. 3Set the method to POST and the URL to https://api.nextapi.top/v1/videos.
  4. 4Configure the authentication to use your Header Auth credential with header name "Authorization" and value "Bearer {key}".
  5. 5Set the JSON body with model plus an input object containing prompt, duration_seconds, and resolution.
  6. 6Save the returned id, then add a second HTTP Request node that calls GET /v1/videos/{id}.
  7. 7Only pass output.url or output.video_url downstream 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": "timelapse of clouds over mountains",
      "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"
For complete setup details including polling, error handling, and security best practices, refer to the third-party tools configuration guide in the NextAPI documentation.

Need help?

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