Quick Start
Get started with our pre-configured Postman collection. Click the button below to fork the collection to your workspace:Run in Postman
What’s Included
Our Postman collection includes ready-to-use requests for:Image Generation
- Text-to-Image - Generate images from text descriptions
- Image-to-Image - Transform existing images
- Upscale - Enhance image resolution
- Variation - Create variations of existing images
Video Generation
- Video Diffusion - Generate videos from images or text
- Video Extend - Extend video duration
- Video Upscale - Enhance video quality
Task Management
- Get Task Status - Check task progress
- Get Task Result - Retrieve completed results
- Cancel Task - Cancel running tasks
Account Management
- Get Balance - Check your account balance and usage
Prerequisites
- A Postman account (free or paid)
- Postman Desktop App or Web Client
- A Legnext API key (Get one here)
Setup Instructions
1. Fork the Collection
Click the “Run in Postman” button above to fork the collection to your workspace.2. Configure API Key
After importing the collection:- Open the collection in Postman
- Go to the “Variables” tab
- Set the
api_keyvariable to your Legnext API key - Save the changes
3. Start Testing
Select any request from the collection and click “Send” to test the API.Collection Features
Environment Variables
The collection uses variables for easy configuration:base_url- API base URL (pre-configured)api_key- Your API key (you need to set this)job_id- Automatically saved from responses for chaining requests
Pre-Request Scripts
Some requests include pre-request scripts to:- Validate required variables
- Generate dynamic data
- Set up request dependencies
Test Scripts
Responses include test scripts that:- Validate response status
- Extract and save job IDs
- Check response structure
Use Cases
API Exploration
Quickly explore all available endpoints and understand request/response formats without writing code.Development Testing
Test API integration during development with easy-to-modify requests and instant feedback.Documentation Reference
Use the collection as a living documentation reference with real examples for all endpoints.Team Collaboration
Share the collection with your team to ensure everyone uses consistent API patterns.Tips and Best Practices
Save Your Responses
Use Postman’s “Save Response” feature to create examples for your team.Use Environments
Create different environments (development, staging, production) with different API keys.Organize with Folders
The collection is organized by feature - use this structure to quickly find what you need.Chain Requests
Use the savedjob_id variable to chain related requests together (e.g., generate → upscale → get result).
Troubleshooting
”Invalid API Key” Error
Make sure you’ve set your API key in the collection variables:- Click on the collection name
- Go to “Variables” tab
- Set the
api_keyvalue - Save