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

# HY3

> Tencent's HY3 reasoning and coding model with a 262K-token context.

**Tencent**`hy3`Context window**262,144 tokens**

Streaming
JSON mode
Reasoning
Long context
Multilingual

Maximum output: **128,000 tokens**.

## Pricing

| Input | Output | Cached input | Cache write |
| :- | :- | :- | :- |
| \$0.14 / MTok | \$0.58 / MTok | \$0.014 / MTok | \$0.14 / MTok |

Typical request (5K input / 1K output tokens): \~\$0.0013. [Live pricing](https://www.ninjachat.ai/api/v1/models/hy3).

## Use this model

[Set up your SDK client](https://docs.ninjachat.ai/sdks.md#create-a-client), then run:

```typescript TypeScript SDK theme={null}
const completion = await client.chat.completions.create({
  model: "hy3",
  messages: [{ role: "user", content: "Explain edge caching in one paragraph." }],
});

console.log(completion.choices[0].message.content);
```

```python Python SDK theme={null}
completion = client.chat.completions.create(
    model="hy3",
    messages=[{"role": "user", "content": "Explain edge caching in one paragraph."}],
)

print(completion["choices"][0]["message"]["content"])
```

```bash cURL theme={null}
curl https://www.ninjachat.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $NINJACHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"hy3","messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}'
```

## Supported parameters

`messages``temperature``max_completion_tokens``top_p``stop``frequency_penalty``presence_penalty``seed``stream``user``routing``response_format``reasoning``reasoning_effort`

Send only parameters from this list. `routing.require_parameters` (default `true`) skips any provider rail that cannot honor every requested parameter, so requests keep the behavior you asked for.

## Routing & fallbacks

Pin `hy3` with `model` when you want this model's behavior, or list it in an ordered `models` array. With `ninja/auto` first, the router's top pick runs first and `hy3` is the explicit fallback; `ninja/auto` acts as the router only when it is the first entry.

```json theme={null}
{
  "models": [
    "ninja/auto",
    "hy3"
  ],
  "messages": [
    {
      "role": "user",
      "content": "Explain edge caching in one paragraph."
    }
  ],
  "routing": {
    "allow_fallbacks": true
  }
}
```

You are billed at the resolved model's token rates, and only for the successful execution.

> [accordion] Check current availability and limits
>
> ```typescript TypeScript SDK theme={null}
> const model = await client.models.retrieve("hy3");
>
> if (!model.servable) throw new Error("hy3 is temporarily unavailable");
>
> console.log({
>   contextWindow: model.contextWindow,
>   maxOutputTokens: model.maxOutputTokens,
>   capabilities: model.capabilities,
>   supportedParameters: model.supportedParameters,
>   pricing: model.pricing,
>   providers: model.providers,
> });
> ```

**Guides:** [Text generation](https://docs.ninjachat.ai/chat.md) · [Fallbacks](https://docs.ninjachat.ai/fallback-chains.md) · [Smart routing](https://docs.ninjachat.ai/smart-routing.md) · [Pricing](https://docs.ninjachat.ai/pricing.md) · [All models](https://docs.ninjachat.ai/models-overview.md)


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