AI-now.space
Attachments
History
Blame
View Source
Changelog
Documentation
About An Otter Wiki
Toggle dark mode
Login
Home
A - Z
Page Index
Chat Api
Compress Api
Home
Video Api
Home
174629
Commit
174629
2024-08-19 16:09:42
admin
: update
home.md
..
@@ 151,6 151,8 @@
### Generate a song using Suno
+
**Request:**
+
```bash
curl -X POST https://api.ai-now.space/api/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
@@ 161,8 163,26 @@
}'
```
+
**Response:**
+
+
The response is a server-sent event stream. Here's an example of the events you might receive:
+
+
```
+
data: {"status": "Processing started"}
+
+
data: {"status": "Processing"}
+
+
data: {"status": "Cookie generated"}
+
+
data: {"status": "Processing"}
+
+
data: {"status": "Completed", "url": "https://dl.ai-now.space/summer_pop_song_12345.mp3"}
+
```
+
### Generate a video using Pika with a specific style
+
**Request:**
+
```bash
curl -X POST https://api.ai-now.space/api/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
@@ 173,3 193,32 @@
"style": "4"
}'
```
+
+
**Response:**
+
+
```
+
data: {"status": "Processing started"}
+
+
data: {"status": "Processing"}
+
+
data: {"status": "Cookie generated"}
+
+
data: {"status": "Processing"}
+
+
data: {"status": "Processing"}
+
+
data: {"status": "Completed", "url": "https://dl.ai-now.space/serene_lake_mountains_67890.mp4"}
+
```
+
+
In these examples, the final event contains a `url` field with the download link for the generated content. The URL structure is:
+
+
```
+
https://dl.ai-now.space/<model>/<generated_file_name>.<extension>
+
```
+
+
Where:
+
- `<model>` is the name of the model used (e.g., "suno", "pika", "luma", "run")
+
- `<generated_file_name>` is a unique identifier for the generated content
+
- `<extension>` is the appropriate file extension for the content type (e.g., ".mp3" for audio, ".mp4" for video)
+
+
Note that the actual file names and identifiers will vary with each generation.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9