Connect NextAPI as a custom tool in Dify to add video generation capabilities to your AI applications. Dify's tool system lets you define external API endpoints that agents can call.
Set the following values in your Dify configuration:
# Dify Custom Tool Schema
openapi: "3.0"
info:
title: NextAPI Video Generation
version: "1.0"
servers:
- url: https://api.nextapi.top
paths:
/v1/video/generations:
post:
operationId: generateVideo
summary: Generate an AI video
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [model, prompt]
properties:
model:
type: string
default: seedance-2.0-pro
prompt:
type: string
duration_seconds:
type: integer
default: 6
resolution:
type: string
default: "1080p"Verify your setup by running this command:
curl -X POST https://api.nextapi.top/v1/video/generations \
-H "Authorization: Bearer $NEXTAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0-pro",
"prompt": "aerial view of a city at sunset",
"duration_seconds": 6,
"resolution": "1080p"
}'Contact our integrations team at support@nextapi.dev or check the full API documentation.