# LLaVA v1.5 13B

> Vision


## Overview

- **Endpoint**: `https://fal.run/fal-ai/llavav15-13b`
- **Model ID**: `fal-ai/llavav15-13b`
- **Category**: vision
- **Kind**: inference
**Tags**: multimodal, vision



## Pricing

- **Price**: $0 per compute seconds

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_):
  Prompt to be used for the image
  - Examples: "Do you know who drew this picture?"

- **`max_new_tokens`** (`integer`, _optional_):
  Maximum number of new (not user provided) tokens to generate Default value: `64`
  - Default: `64`

- **`temperature`** (`float`, _optional_):
  Controls randomness, higher values increase diversity. Too high might lead to gibberish. Default value: `0.2`
  - Default: `0.2`
  - Range: `0` to `1`

- **`top_p`** (`float`, _optional_):
  The cumulative probability cutoff for token selection. Lower values mean sampling from a smaller, more top-weighted nucleus. Default value: `1`
  - Default: `1`

- **`image_url`** (`string`, _required_):
  URL of the image to be used as input
  - Examples: "https://llava-vl.github.io/static/images/monalisa.jpg"



**Required Parameters Example**:

```json
{
  "prompt": "Do you know who drew this picture?",
  "image_url": "https://llava-vl.github.io/static/images/monalisa.jpg"
}
```

**Full Example**:

```json
{
  "prompt": "Do you know who drew this picture?",
  "max_new_tokens": 64,
  "temperature": 0.2,
  "top_p": 1,
  "image_url": "https://llava-vl.github.io/static/images/monalisa.jpg"
}
```


### Output Schema

The API returns the following output format:

- **`output`** (`string`, _required_):
  Generated text based on the input prompt and image

- **`partial`** (`boolean`, _optional_):
  Whether the output is partial or complete. Only applicable for streaming requests.
  - Default: `false`

- **`stats`** (`Stats`, _optional_):
  Information about the generation (I/O token count).



**Example Response**:

```json
{
  "output": ""
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/llavav15-13b \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "Do you know who drew this picture?",
     "image_url": "https://llava-vl.github.io/static/images/monalisa.jpg"
   }'
```

### 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(
    "fal-ai/llavav15-13b",
    arguments={
        "prompt": "Do you know who drew this picture?",
        "image_url": "https://llava-vl.github.io/static/images/monalisa.jpg"
    },
    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("fal-ai/llavav15-13b", {
  input: {
    prompt: "Do you know who drew this picture?",
    image_url: "https://llava-vl.github.io/static/images/monalisa.jpg"
  },
  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/fal-ai/llavav15-13b)
- [API Documentation](https://fal.ai/models/fal-ai/llavav15-13b/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/llavav15-13b)

### 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)
