API des Modells tencent/hy4-preview bei OpenRouter, $0.7506 / $2.2509 pro Million Tokens, Kontext 1.048.576 Tokens. Beispiele in curl, Python und JavaScript, Live-Test.
Im Katalog testen und bewerten
Tencent: Hy4 preview is a mixture-of-experts model from Tencent, with 49B active parameters out of 770B total. It is designed for coding agents, complex tool-use workflows, and productivity tasks that...
- Typ
- Modell
- Anbieter
- OpenRouter
- Modell-ID
tencent/hy4-preview- Preis
- Kostenpflichtig
- Preis Eingabe / Ausgabe
- $0.7506 / $2.2509 pro Million Tokens
- Zugang ohne Schlüssel
- Nein
- Schlüsselvariable
OPENROUTER_API_KEY- Basis-URL (OpenAI-kompatibel)
https://openrouter.ai/api/v1- Kontext
- 1.048.576 Tokens
- Eingaben
- Text
- Funktionen
- Reasoning, JSON-Ausgabe, Tool-Aufrufe
- Entwicklerbewertung
- Noch nicht bewertet
- Dokumentation
- https://openrouter.ai/tencent/hy4-preview
Codebeispiele
cURL
curl https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{"model":"tencent/hy4-preview","messages":[{"role":"user","content":"Hallo, stell dich in einem Satz vor."}]}'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-preview",
messages=[{"role": "user", "content": "Hallo, stell dich in einem Satz vor."}],
)
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-preview',
messages: [{ role: 'user', content: 'Hallo, stell dich in einem Satz vor.' }],
})
console.log(r.choices[0].message.content)
Beliebte Suchen
Häufige Fragen
Ist die API von Tencent: Hy4 preview kostenlos?
Nein: Tencent: Hy4 preview ist eine kostenpflichtige API ($0.7506 / $2.2509 pro Million Tokens).
Wie rufe ich Tencent: Hy4 preview aus meinem Code auf?
Tencent: Hy4 preview bietet eine OpenAI-kompatible API unter https://openrouter.ai/api/v1: Verwenden Sie ein beliebiges OpenAI-SDK (Python, JavaScript …) mit dieser Basis-URL. Modellkennung: tencent/hy4-preview. Fertiger Code (Streaming, JSON, Wiederholungen) steht im Werkzeugkasten für Entwickler bereit.
Wie groß ist das Kontextfenster von Tencent: Hy4 preview?
Tencent: Hy4 preview verarbeitet bis zu 1.048.576 Tokens Kontext (Nachricht und Verlauf).
Welche Alternativen gibt es zu Tencent: Hy4 preview?
Ähnliche APIs im Katalog: Hy4-flash · Fireworks, Hy4-flash · Pearl Research, Hy4 · Together, Hy4-flash · DeepInfra, Tencent: Hy4 flash.
Alternativen
- Hy4-flash · Fireworks — Kostenpflichtig
- Hy4-flash · Pearl Research — Kostenpflichtig
- Hy4 · Together — Kostenpflichtig
- Hy4-flash · DeepInfra — Kostenpflichtig
- Tencent: Hy4 flash — Kostenpflichtig
- Tencent: Hy4 — Kostenpflichtig
- Tencent: Hy-MT2-1.8B — Kostenpflichtig
- Tencent: Hy-MT2-30B-A3B — Kostenpflichtig
- Tencent: Hy-MT2-7B — Kostenpflichtig
- Tencent: Hy3 — Kostenpflichtig