> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# truss predict

> Call the packaged model.

```sh theme={"system"}
truss predict [OPTIONS]
```

Calls the packaged model with the provided input data. Use this to test your model locally or remotely.

### Options

<ParamField body="--target-directory" type="TEXT">
  A Truss directory. Defaults to current directory.
</ParamField>

<ParamField body="-d, --data" type="TEXT">
  JSON string representing the request payload.
</ParamField>

<ParamField body="-f, --file" type="PATH">
  Path to a JSON file containing the request payload.
</ParamField>

<ParamField body="--remote" type="TEXT">
  Name of the remote in .trussrc to invoke.
</ParamField>

<ParamField body="--model" type="TEXT">
  ID of the model to invoke.
</ParamField>

<ParamField body="--model-deployment" type="TEXT">
  ID of the model deployment to invoke.
</ParamField>

<ParamField body="--model-version" type="TEXT">
  **Deprecated:** Use `--model-deployment` instead. ID of the model deployment to invoke.
</ParamField>

<ParamField body="--published">
  Invoke the published (production) deployment.
</ParamField>

**Examples:**

Call a deployed model with inline JSON data:

```sh theme={"system"}
truss predict --remote baseten --model YOUR_MODEL_ID -d '{"prompt": "What is the meaning of life?"}'
```

The response is printed as formatted JSON. For streaming models, output is printed as chunks arrive.

Call a model using a JSON file:

```sh theme={"system"}
truss predict -f request.json
```

Call the production deployment:

```sh theme={"system"}
truss predict --published -d '{"prompt": "Hello, world!"}'
```
