Create breath-taking videos with PixVerse AI
Tags: pixverse, discord, ai, webdev
Published: 2024-06-09 06:19:23

### Introduction

In this article we will show hot to use an [experimental API](https://useapi.net/docs/api-pixverse-v1) for the [PixVerse Discord Bot](https://discord.com/invite/MXHErdJHMg) by [PixVerse.AI](https://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](https://pixverse.notion.site/Available-Characters-for-Anime-Style-6648259c5db146be9e35509bfb9a3c86). PixVerse can also create a [meme face](https://pixverse.notion.site/Use-Meme_face-To-Create-Videos-With-The-Face-You-Upload-c6399111aced4b0aa04cb456bc3866d2) video from a provided image.

### Examples

[/animate](https://useapi.net/docs/api-pixverse-v1/post-pixverse-animate)  
Source [image](https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249165862900994138/source.jpg)  
<video src="https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249165754390024203/job20240609001856765-button-.mp4" width="240" height="320" controls type="video/mp4" preload="metadata"></video>

[/meme_face](https://useapi.net/docs/api-pixverse-v1/post-pixverse-meme_face)  
Source [image](https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249165862900994138/source.jpg)  
> A girl smiling by the beach, sunset in the background   

<video src="https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249165965611110400/job20240609001914960-button-.mp4" width="320" height="320" controls type="video/mp4" preload="metadata"></video>

[/create_single](https://useapi.net/docs/api-pixverse-v1/post-pixverse-create_single)  
> 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   

<video src="https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249166215365136466/job20240609001917453-button-.mp4" width="320" height="240" controls type="video/mp4" preload="metadata"></video>

[/create](https://useapi.net/docs/api-pixverse-v1/post-pixverse-create)  
> 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   

<video src="https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249166464728957061/job20240609002137214-button-U1.mp4" width="320" height="240" controls type="video/mp4" preload="metadata"></video>

> A women silhouette dancing provocative with flashing strobe lights flashing with laser beams   

<video src="https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249166624930398420/job20240609002138983-button-U1.mp4" width="320" height="240" controls type="video/mp4" preload="metadata"></video>

> A girl smiling in a magic redwood forest   

<video src="https://demo.useapi.net/discord-cdn-proxy/?https://cdn.discordapp.com/attachments/1239264794394234985/1249166579510284358/job20240609002157557-button-V2.mp4" width="320" height="240" controls type="video/mp4" preload="metadata"></video>

### Setup 

We will use the experimental API provided by [useapi.net](https://useapi.net) to interact with [Midjourney](https://useapi.net/docs/api-v2), [InsightFaceSwap](https://useapi.net/docs/api-faceswap-v1), [Pika](https://useapi.net/docs/api-pika-v1) and [PixVerse](https://useapi.net/docs/api-pixverse-v1) Discord bots.

#### Useapi.net

You need a monthly [subscription](https://useapi.net/docs/subscription) to use the [useapi.net](https://useapi.net) experimental APIs mentioned in this article.
Follow these [steps](https://useapi.net/docs/start-here/setup-useapi) to get started.

#### PixVerse

The PixVerse Discord bot is currently free, please follow these [simple steps](https://useapi.net/docs/start-here/setup-pixverse) 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](https://useapi.net/docs/start-here/setup-pixverse#verify-discord-access).
- Once you have all the above, please create or update your [PixVerse account information](https://useapi.net/docs/api-pixverse-v1/post-pixverse-account-channel) 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](https://useapi.net/docs/api-pixverse-v1/post-pixverse-create#try-it), [/animate](https://useapi.net/docs/api-pixverse-v1/post-pixverse-animate#try-it), or [/meme_face](https://useapi.net/docs/api-pixverse-v1/post-pixverse-meme_face#try-it).

For your convenience, we have published all the [source code](https://github.com/useapi/examples/tree/main/pixverse-demo) 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](https://ngrok.com/docs/getting-started/#step-2-connect-your-account) 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](https://github.com/useapi/examples/blob/main/pixverse-demo/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](https://github.com/useapi/examples/blob/main/pixverse-demo/example.js)
```bash
USEAPI_TOKEN="useapi API token" NGROK_AUTHTOKEN="ngrok authtoken" node ./example.js
```

#### [Python](https://github.com/useapi/examples/blob/main/pixverse-demo/example.py)
```bash
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](https://useapi.net/docs/api-pixverse-v1/post-pixverse-button) API endpoint.

### Conclusion

Visit our [Discord Server](https://discord.gg/w28uK3cnmF) or [Telegram Channel](https://t.me/use_api) for any support questions and concerns. 

We regularly post guides and tutorials on the [YouTube Channel](https://www.youtube.com/@midjourneyapi).