Introduction
In this article we will show hot to use an experimental API for the PixVerse Discord Bot by PixVerse.AI to generate videos. PixVerse currently supports text and image inputs for generating 4-second-long videos. The available video styles include Realistic
, Anime
, and 3D Animation
. For the Anime
style you can reference one of the anime characters. PixVerse can also create a meme face video from a provided image.
Examples
Source image
Source image
A girl smiling by the beach, sunset in the background
A cinematic shot of a tiny hedgehog dressed in a complete astronaut suit, floating in the vastness of outer space. The hedgehog is repairing a small satellite with tiny tools. The Earth shines in the distance, and stars and constellations illuminate the dark cosmic background. Nearby, a futuristic spaceship with another animal peeking from a window completes the cosmic scene
A front view, head to toe, beautiful female model walking the runway. Emphasis is on the Great Gatsby inspired evening gown in the style of John Galliano
A women silhouette dancing provocative with flashing strobe lights flashing with laser beams
A girl smiling in a magic redwood forest
Setup
We will use the experimental API provided by useapi.net to interact with Midjourney, InsightFaceSwap, Pika and PixVerse Discord bots.
Useapi.net
You need a monthly subscription to use the useapi.net experimental APIs mentioned in this article.
Follow these steps to get started.
PixVerse
The PixVerse Discord bot is currently free, please follow these simple steps to obtain the following:
- Discord server ID number, referred to in this article as
server
. - Discord channel ID number, referred to in this article as
channel
. - Discord token, referred to in this article as
discord
. Verify Discord access. - Once you have all the above, please create or update your PixVerse account information so that you no longer need to provide them with every API call.
Useapi.net provides an easy way to experiment with all API endpoints without writing any code. Check the Try It
section at the end of each document page, such as PixVerse’s /create, /animate, or /meme_face.
For your convenience, we have published all the source code used in this article. You can choose between JavaScript and Python examples. Clone this repository locally and use it as a starting point for your experiments.
Ngrok
Follow official instructions to sign up for an ngrok account and copy your ngrok authtoken
from your ngrok dashboard.
Preparing PixVerse prompts
An array of desired prompts should be saved to a locally cloned prompts.json file.
Executing prompts using PixVerse experimental API by useapi.net
Create a file locally in the same folder named example.sh
with the following content:
JavaScript
USEAPI_TOKEN="useapi API token" NGROK_AUTHTOKEN="ngrok authtoken" node ./example.js
Python
USEAPI_TOKEN="useapi API token" NGROK_AUTHTOKEN="ngrok authtoken" python3 ./example.py
Execute it from the command line like this: ./example.sh
and observe the magic of the experimental API.
The generated videos will be saved locally. You may proceed with the generation process within a Discord channel to further refine your creations. Alternatively, you can continue automate the process by using the /button API endpoint.
Conclusion
Visit our Discord Server or Telegram Channel for any support questions and concerns.
We regularly post guides and tutorials on the YouTube Channel.
Discover more from Coursity
Subscribe to get the latest posts sent to your email.