Skip to main content

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:
  1. Open the collection in Postman
  2. Go to the “Variables” tab
  3. Set the api_key variable to your Legnext API key
  4. 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 saved job_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:
  1. Click on the collection name
  2. Go to “Variables” tab
  3. Set the api_key value
  4. Save

”Request Timeout” Error

Some operations (like video generation) take time. Use the task status endpoint to poll for results instead of waiting for the initial request.

Variables Not Saving

Make sure you’re saving the collection after making changes to variables.

Public Workspace

Visit our public Postman workspace to explore more: View Legnext AI Workspace

Need Help?

If you need assistance with the Postman collection, reach out to our support team at [email protected]