Microsoft
Microsoft: Phi 4
[Microsoft Research](/microsoft) Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion parameters, it was trained on a mix of high-quality synthetic datasets, data from curated websites, and academic materials. It has undergone careful improvement to follow instructions accurately and maintain strong safety standards. It works best with English language inputs. For more information, please see [Phi-4 Technical Report](https://arxiv.org/pdf/2412.08905)
OpenRouter 원가 (1M 토큰)
입력$0.060
출력$0.140
합계$0.200
인보이스랩 (월 예상)
입력 0.5M + 출력 0.5M 기준
공급가액₩164
부가세 (10%)₩17
결제 금액₩181
💡 부가세 ₩17 매입공제 가능
모델 정보
기본 정보
| 모델 ID | microsoft/phi-4 |
| 제공사 | Microsoft |
| 컨텍스트 윈도우 | 16,384 토큰 |
| 모달리티 | text->text |
지원 기능
📋 Structured Output📄 JSON Mode🌡️ Temperature📏 Max Tokens
API 사용법
Python (OpenAI SDK 호환)
from openai import OpenAI
client = OpenAI(
api_key="your-dream-api-key",
base_url="https://api.invoicedream.co.kr/v1"
)
response = client.chat.completions.create(
model="microsoft/phi-4",
messages=[
{"role": "user", "content": "안녕하세요"}
]
)
print(response.choices[0].message.content)Node.js / TypeScript
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'your-dream-api-key',
baseURL: 'https://api.invoicedream.co.kr/v1'
});
const response = await client.chat.completions.create({
model: 'microsoft/phi-4',
messages: [{ role: 'user', content: '안녕하세요' }]
});
console.log(response.choices[0].message.content);cURL
curl https://api.invoicedream.co.kr/v1/chat/completions \
-H "Authorization: Bearer your-dream-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "microsoft/phi-4",
"messages": [{"role": "user", "content": "안녕하세요"}]
}'💡 Tip: OpenAI SDK를 그대로 사용할 수 있습니다.base_url만 변경하면 됩니다!