TensaHub › OpenRouter

Tencent: Hy-MT2-7B

API del modello tencent/hy-mt2-7b su OpenRouter, $0.074 / $0.295 per milione di token, contesto 8192 token. Esempi in curl, Python e JavaScript, test dal vivo.

Prova e valuta nel catalogo

Hy-MT2-7B is a 7B-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 translation.

Tipo
Modello
Fornitore
OpenRouter
ID del modello
tencent/hy-mt2-7b
Prezzo
A pagamento
Prezzo input / output
$0.074 / $0.295 per milione di token
Accesso senza chiave
No
Variabile della chiave
OPENROUTER_API_KEY
URL di base (compatibile OpenAI)
https://openrouter.ai/api/v1
Contesto
8192 token
Input
Testo
Funzioni
Output JSON
Valutazione degli sviluppatori
Non ancora valutato
Documentazione
https://openrouter.ai/tencent/hy-mt2-7b

Esempi di codice

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-7b","messages":[{"role":"user","content":"Ciao, presentati in 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-7b",
    messages=[{"role": "user", "content": "Ciao, presentati in 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-7b',
  messages: [{ role: 'user', content: 'Ciao, presentati in una frase.' }],
})
console.log(r.choices[0].message.content)

Genera il codice di integrazione →

Ricerche popolari

Domande frequenti

L’API di Tencent: Hy-MT2-7B è gratuita?

No: Tencent: Hy-MT2-7B è un’API a pagamento ($0.074 / $0.295 per milione di token).

Come chiamo Tencent: Hy-MT2-7B dal mio codice?

Tencent: Hy-MT2-7B offre un’API compatibile con OpenAI all’indirizzo https://openrouter.ai/api/v1: usa qualsiasi SDK OpenAI (Python, JavaScript…) con questo URL di base. Identificatore del modello: tencent/hy-mt2-7b. Codice pronto all’uso (streaming, JSON, nuovi tentativi) è disponibile nella cassetta degli attrezzi per sviluppatori.

Qual è la finestra di contesto di Tencent: Hy-MT2-7B?

Tencent: Hy-MT2-7B accetta fino a 8192 token di contesto (messaggio e cronologia).

Quali sono le alternative a Tencent: Hy-MT2-7B?

API simili nel catalogo: Hy4-flash · Fireworks, Hy4-flash · Pearl Research, Hy4 · Together, Hy4-flash · DeepInfra, Tencent: Hy4 flash.

Alternative