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

# Require a precision

> Keep a request on providers that publish the weight precision they serve a model in, such as fp8 or bf16, so its answers come from the precision you choose.

A model's answers can change with the precision its weights are served in, and providers differ: one serves `bf16`, another `fp8` or `fp4`. By default, NagaAI sends a request to any provider of the model. To keep a request on the precisions you trust, list them in `routing.precision`.

## Before you begin

Check which precisions your model is served in. In [`GET /v1/models`](https://docs.naga.ac/get-started/models#read-a-model-entry), the model's `precision` lists the precisions its providers publish, such as `["bf16", "fp8"]`. A model without `precision` has no provider that publishes one, so a requirement fails every request to it.

## Require a precision

1. Pick one or more values from the model's `precision`. [The routing object](https://docs.naga.ac/api-reference/routing-object.md#precision-values) lists every value.
2. Add `routing.precision` with the list.
3. Send the request:

   ```python Python theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
   import os

   from openai import OpenAI

   client = OpenAI(base_url="https://api.naga.ac/v1", api_key=os.environ["NAGA_API_KEY"])

   response = client.responses.create(
       model="deepseek/deepseek-v4-pro",
       input="Suggest a name for a Python library that parses invoices.",
       extra_body={"routing": {"precision": ["fp8", "bf16"]}},
   )

   print(response.output_text)
   ```

   ```javascript Node.js theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
   import OpenAI from "openai";

   const client = new OpenAI({ baseURL: "https://api.naga.ac/v1", apiKey: process.env.NAGA_API_KEY });

   const response = await client.responses.create({
     model: "deepseek/deepseek-v4-pro",
     input: "Suggest a name for a Python library that parses invoices.",
     routing: { precision: ["fp8", "bf16"] },
   });

   console.log(response.output_text);
   ```

   ```bash cURL theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
   curl https://api.naga.ac/v1/responses \
     -H "Authorization: Bearer $NAGA_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "model": "deepseek/deepseek-v4-pro",
       "input": "Suggest a name for a Python library that parses invoices.",
       "routing": {"precision": ["fp8", "bf16"]}
     }'
   ```

The response is a normal answer, and `output_text` holds the model's text. Chat Completions and Messages take the field the same way, and so do image, video, audio, embedding, moderation, and rerank requests. In a form, the OpenAI SDKs send the list as repeated `routing[precision][]` parts.

## Troubleshooting

### `400`: no provider serves it in a listed precision

None of the model's providers, and none of your fallback models, publishes a precision you listed. The request fails before any provider is called, and `param` is `routing.precision`:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
No provider of the 'anthropic/claude-sonnet-5.5' model serves it in a precision `routing.precision` lists.
```

Add a precision from the model's `precision`, drop `routing.precision`, or add a [fallback model](https://docs.naga.ac/build/routing.md#fallback-models) that is served in a listed precision.

### `400`: unknown precision

A value isn't one NagaAI knows, such as `fp7`. Use a value from the model's `precision`; [The routing object](https://docs.naga.ac/api-reference/routing-object.md#errors) lists every error of `routing` with its message.

## See also

* [The routing object](https://docs.naga.ac/api-reference/routing-object.md): every field of `routing`.
* [Routing](https://docs.naga.ac/build/routing.md#precision): why a requirement leaves fewer providers to try.
* [Limit the price of a request](https://docs.naga.ac/guides/limit-the-price.md): the other filter on providers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.