API del modelo tencent/hy-mt2-1.8b en OpenRouter, $0.044 / $0.177 por millón de tokens, contexto 8192 tokens. Ejemplos en curl, Python y JavaScript, prueba en directo.
Probar y valorar en el catálogo
Hy-MT2-1.8B is a compact 1.8B-parameter translation model from Tencent. It supports 33 language pairs and five Chinese dialect and minority-language pairs, with workflows for structured, delimiter-based, contextual, glossary-based, and style-guided...
- Tipo
- Modelo
- Proveedor
- OpenRouter
- ID del modelo
tencent/hy-mt2-1.8b- Precio
- De pago
- Precio entrada / salida
- $0.044 / $0.177 por millón de tokens
- Acceso sin clave
- No
- Variable de clave
OPENROUTER_API_KEY- URL base (compatible con OpenAI)
https://openrouter.ai/api/v1- Contexto
- 8192 tokens
- Entradas
- Texto
- Valoración de desarrolladores
- Aún sin valorar
- Documentación
- https://openrouter.ai/tencent/hy-mt2-1.8b
Ejemplos de código
cURL
curl https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{"model":"tencent/hy-mt2-1.8b","messages":[{"role":"user","content":"Hola, preséntate en una frase."}]}'Python
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
r = client.chat.completions.create(
model="tencent/hy-mt2-1.8b",
messages=[{"role": "user", "content": "Hola, preséntate en una frase."}],
)
print(r.choices[0].message.content)JavaScript
// npm install openai
import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY })
const r = await client.chat.completions.create({
model: 'tencent/hy-mt2-1.8b',
messages: [{ role: 'user', content: 'Hola, preséntate en una frase.' }],
})
console.log(r.choices[0].message.content)
Generar el código de integración →
Búsquedas populares
Preguntas frecuentes
¿Es gratuita la API de Tencent: Hy-MT2-1.8B?
No: Tencent: Hy-MT2-1.8B es una API de pago ($0.044 / $0.177 por millón de tokens).
¿Cómo llamo a Tencent: Hy-MT2-1.8B desde mi código?
Tencent: Hy-MT2-1.8B ofrece una API compatible con OpenAI en https://openrouter.ai/api/v1: usa cualquier SDK de OpenAI (Python, JavaScript…) con esta URL base. Identificador del modelo: tencent/hy-mt2-1.8b. Hay código listo para usar (streaming, JSON, reintentos) en la caja de herramientas para desarrolladores.
¿Cuál es la ventana de contexto de Tencent: Hy-MT2-1.8B?
Tencent: Hy-MT2-1.8B acepta hasta 8192 tokens de contexto (mensaje e historial).
¿Qué alternativas hay a Tencent: Hy-MT2-1.8B?
API similares del catálogo: Hy4-flash · DeepInfra, Hy4-flash · Fireworks, Hy4-flash · Pearl Research, Hy4 · Together, Hy4 · DeepInfra.
Alternativas
- Hy4-flash · DeepInfra — De pago
- Hy4-flash · Fireworks — De pago
- Hy4-flash · Pearl Research — De pago
- Hy4 · Together — De pago
- Hy4 · DeepInfra — De pago
- Tencent: Hy4 flash — De pago
- Tencent: Hy4 — De pago
- Tencent: Hy4 preview — De pago
- Tencent: Hy-MT2-30B-A3B — De pago
- Tencent: Hy-MT2-7B — De pago
- Tencent: Hy3 — De pago