# Tripo P1 Text to 3D

> Generate 3D models from text descriptions using Tripo P1.


## Overview

- **Endpoint**: `https://fal.run/tripo3d/p1/text-to-3d`
- **Model ID**: `tripo3d/p1/text-to-3d`
- **Category**: text-to-3d
- **Kind**: inference
**Tags**: 3d, text-to-3d, 3d-generation, tripo



## Pricing

- **Price**: $0.01 per credits

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  Text description of the 3D object to generate. Maximum 1024 characters.
  - Examples: "A simple wooden chair"

- **`face_limit`** (`integer`, _optional_):
  Target number of faces for the generated mesh. If not set, the model adaptively determines the count.
  - Range: `48` to `20000`

- **`texture`** (`boolean`, _optional_):
  Whether to generate textures for the model. Default value: `true`
  - Default: `true`

- **`model_seed`** (`integer`, _optional_):
  Seed for geometry generation reproducibility.



**Required Parameters Example**:

```json
{
  "prompt": "A simple wooden chair"
}
```

**Full Example**:

```json
{
  "prompt": "A simple wooden chair",
  "texture": true
}
```


### Output Schema

The API returns the following output format:

- **`model_mesh`** (`File`, _required_):
  Generated 3D model file in GLB format.

- **`model_urls`** (`ModelUrls`, _required_):
  URLs for different 3D model variants.

- **`rendered_image`** (`File`, _optional_):
  Preview render of the generated 3D model.



**Example Response**:

```json
{
  "model_mesh": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  },
  "model_urls": {}
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/tripo3d/p1/text-to-3d \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "A simple wooden chair"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "tripo3d/p1/text-to-3d",
    arguments={
        "prompt": "A simple wooden chair"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("tripo3d/p1/text-to-3d", {
  input: {
    prompt: "A simple wooden chair"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/tripo3d/p1/text-to-3d)
- [API Documentation](https://fal.ai/models/tripo3d/p1/text-to-3d/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=tripo3d/p1/text-to-3d)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
