API del modelo tencent/hy4 en OpenRouter, $0.417 / $1.2505 por millón de tokens, contexto 1.048.576 tokens. Ejemplos en curl, Python y JavaScript, prueba en directo.
Probar y valorar en el catálogo
The official release of Hy4 delivers comprehensive and substantial improvements over Hy4 Preview, with particularly strong gains in agentic capabilities and performance across a wide range of long-horizon, real-world productivity...
- Tipo
- Modelo
- Proveedor
- OpenRouter
- ID del modelo
tencent/hy4- Precio
- De pago
- Precio entrada / salida
- $0.417 / $1.2505 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
- 1.048.576 tokens
- Entradas
- Texto, Imagen
- Funciones
- Razonamiento, Salida JSON, Llamada a herramientas
- Valoración de desarrolladores
- Aún sin valorar
- Documentación
- https://openrouter.ai/tencent/hy4
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/hy4","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/hy4",
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/hy4',
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: Hy4?
No: Tencent: Hy4 es una API de pago ($0.417 / $1.2505 por millón de tokens).
¿Cómo llamo a Tencent: Hy4 desde mi código?
Tencent: Hy4 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/hy4. 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: Hy4?
Tencent: Hy4 acepta hasta 1.048.576 tokens de contexto (mensaje e historial).
¿Qué alternativas hay a Tencent: Hy4?
API similares del catálogo: Hy4-flash · Fireworks, Hy4-flash · Pearl Research, Hy4 · Together, Hy4-flash · DeepInfra, Tencent: Hy4 flash.
Alternativas
- Hy4-flash · Fireworks — De pago
- Hy4-flash · Pearl Research — De pago
- Hy4 · Together — De pago
- Hy4-flash · DeepInfra — De pago
- Tencent: Hy4 flash — De pago
- Tencent: Hy4 preview — De pago
- Tencent: Hy-MT2-1.8B — De pago
- Tencent: Hy-MT2-30B-A3B — De pago
- Tencent: Hy-MT2-7B — De pago
- Tencent: Hy3 — De pago
- LLM7 · hy4 — De pago