简体中文
Aihubmix 推出应用标识码 APP-Code,为开发者们提供全部模型 10% 优惠。
curl https://aihubmix.com/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-***" \ -H "APP-Code:***" \ -d '{ "model": "gpt-4o-2024-11-20", "input": "Hello! Please say Hello back to me." }'
client = genai.Client( api_key="sk-***", # 🔑 换成你在 AiHubMix 生成的密钥 http_options={ "base_url": "https://api.aihubmix.com/gemini", "headers": { "APP-Code": "***" } }, )
import os import anthropic client = anthropic.Anthropic( api_key="sk-***", # 🔑 换成你在 AiHubMix 生成的密钥 base_url="https://aihubmix.com" ) message = client.messages.create( extra_headers={"APP-Code":"***"}, model="claude-3-7-sonnet-20250219", max_tokens=1024, messages=[ {"role": "user", "content": "Hello, Claude"} ] ) print(message.content)