Skip to content

Commit 2bfb1c8

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-732: docs: add pixverse/lip-sync and hints to pixverses v5
1 parent 88de0b1 commit 2bfb1c8

10 files changed

Lines changed: 413 additions & 10 deletions

File tree

docs/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
* [v5/transition](api-references/video-models/pixverse/v5-transition.md)
313313
* [v5.5/text-to-video](api-references/video-models/pixverse/v5-5-text-to-video.md)
314314
* [v5.5/image-to-video](api-references/video-models/pixverse/v5-5-image-to-video.md)
315+
* [lip-sync](api-references/video-models/pixverse/lip-sync.md)
315316
* [Runway](api-references/video-models/runway/README.md)
316317
* [gen3a\_turbo](api-references/video-models/runway/gen3a_turbo.md)
317318
* [gen4\_turbo](api-references/video-models/runway/gen4_turbo.md)
@@ -381,6 +382,8 @@
381382
* [LlamaGuard-2-8b](api-references/moderation-safety-models/Meta/LlamaGuard-2-8b.md)
382383
* [Meta-Llama-Guard-3-8B](api-references/moderation-safety-models/Meta/Meta-Llama-Guard-3-8B.md)
383384
* [3D-Generating Models](api-references/3d-generating-models/README.md)
385+
* [Magic](api-references/3d-generating-models/magic/README.md)
386+
* [magic/image-to-3d](api-references/3d-generating-models/magic/image-to-3d.md)
384387
* [Stability AI](api-references/3d-generating-models/Stability-AI/README.md)
385388
* [triposr](api-references/3d-generating-models/Stability-AI/triposr.md)
386389
* [Vision Models](api-references/vision-models/README.md)

docs/api-references/3d-generating-models/Stability-AI/triposr.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# triposr
22

3+
{% columns %}
4+
{% column width="66.66666666666666%" %}
35
{% hint style="info" %}
46
This documentation is valid for the following list of our models:
57

68
* `triposr`
79
{% endhint %}
10+
{% endcolumn %}
11+
12+
{% column width="33.33333333333334%" %}
13+
<a href="https://aimlapi.com/app/triposr" class="button primary">Try in Playground</a>
14+
{% endcolumn %}
15+
{% endcolumns %}
816

917
## Model Overview
1018

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
hidden: true
3+
noIndex: true
4+
---
5+
6+
# Magic
7+
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
hidden: true
3+
noIndex: true
4+
---
5+
6+
# magic/image-to-3d
7+
8+
{% columns %}
9+
{% column width="66.66666666666666%" %}
10+
{% hint style="info" %}
11+
This documentation is valid for the following list of our models:
12+
13+
* `magic/image-to-3d`
14+
{% endhint %}
15+
{% endcolumn %}
16+
17+
{% column width="33.33333333333334%" %}
18+
<a href="https://aimlapi.com/app/magic/image-to-3d" class="button primary">Try in Playground</a>
19+
{% endcolumn %}
20+
{% endcolumns %}
21+
22+
## Model Overview
23+
24+
The model creates a 3D mesh from images of an object captured from multiple viewpoints (1 to 4 images).
25+
26+
## Setup your API Key
27+
28+
If you don’t have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).
29+
30+
## API Schema
31+
32+
{% openapi-operation spec="image-to-3d" path="/v1/images/generations" method="post" %}
33+
[OpenAPI image-to-3d](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/3d-generating-models/magic/image-to-3d.json)
34+
{% endopenapi-operation %}
35+
36+
## Example
37+
38+
{% tabs %}
39+
{% tab title="Python" %}
40+
{% code overflow="wrap" %}
41+
```python
42+
import requests
43+
44+
45+
def main():
46+
response = requests.post(
47+
"https://api.aimlapi.com/v1/images/generations",
48+
headers={
49+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
50+
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
51+
"Content-Type": "application/json",
52+
},
53+
json={
54+
"model": "magic/image-to-3d",
55+
"front_image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Fly_Agaric_mushroom_05.jpg/576px-Fly_Agaric_mushroom_05.jpg",
56+
},
57+
)
58+
59+
response.raise_for_status()
60+
data = response.json()
61+
url = data["model_mesh"]["url"]
62+
file_name = data["model_mesh"]["file_name"]
63+
64+
mesh_response = requests.get(url, stream=True)
65+
66+
with open(file_name, "wb") as file:
67+
for chunk in mesh_response.iter_content(chunk_size=8192):
68+
file.write(chunk)
69+
70+
71+
if __name__ == "__main__":
72+
main()
73+
```
74+
{% endcode %}
75+
{% endtab %}
76+
77+
{% tab title="JavaScript" %}
78+
79+
{% endtab %}
80+
{% endtabs %}
81+
82+
**Response**:
83+
84+
The example returns a textured 3D mesh in GLB file format. You can view it [here](https://drive.google.com/file/d/1pfA6PGgDY31rEGcoea7qoZW6uhhPYSE6/view?usp=sharing).
85+
86+
For clarity, we took several screenshots of our mushroom from different angles in an online GLB viewer. As you can see, the model understands the shape, but preserving the pattern on the back side (which was not visible on the reference image) could be improved:
87+
88+
<table data-header-hidden><thead><tr><th valign="top"></th><th></th><th></th></tr></thead><tbody><tr><td valign="top"><img src="../../../.gitbook/assets/image (5).png" alt="" data-size="original"></td><td><img src="../../../.gitbook/assets/image (9).png" alt="" data-size="original"></td><td><img src="../../../.gitbook/assets/image (7).png" alt="" data-size="original"></td></tr></tbody></table>
89+
90+
Compare them with the [reference image](https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Fly_Agaric_mushroom_05.jpg/576px-Fly_Agaric_mushroom_05.jpg):
91+
92+
<table data-header-hidden><thead><tr><th width="279"></th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td><img src="../../../.gitbook/assets/576px-Fly_Agaric_mushroom_05 (1).jpg" alt="" data-size="original"></td><td></td><td></td></tr></tbody></table>
93+
94+
{% hint style="info" %}
95+
Try to choose reference images where the target object is not obstructed by other objects and does not blend into the background. Depending on the complexity of the object, you may need to experiment with the resolution of the reference image to achieve a satisfactory mesh.
96+
{% endhint %}

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/video-models/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)