Seedance 2.0 | Special Offer ✦ 10% OFF NOW | Ends May 13 (UTC+0)
microsoft
microsoft/phi-4

microsoft/phi-4

16,384 context · $0.07/M input tokens · $0.14/M output tokens

Microsoft Research 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...

Harga

Bayar sesuai pemakaian

Tanpa biaya di muka, bayar hanya sesuai penggunaan

Input$0.07 / M Tokens
Output$0.14 / M Tokens

Coba model

microsoft/phi-4
Online
microsoft
Hai! Saya asisten AI yang siap membantu. Ada yang bisa saya bantu?

Penggunaan API

Gunakan contoh kode berikut untuk integrasi dengan API kami:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.wavespeed.ai/v1"
)

response = client.chat.completions.create(
    model="microsoft/phi-4",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

Pengenalan Model

Microsoft phi-4

microsoft phi-4


Why It Looks Great

  • Large Language Model architecture for efficient processing
  • 16384 context window for long document handling
  • Competitive pricing at $0.1/$0.1 per million tokens

Key Features

  • Context Window: 16384 tokens
  • Max Output: 4096 tokens
  • Vision: Supported
  • Function Calling: Supported

Specifications

SpecificationValue
ProviderMicrosoft
Model TypeLarge Language Model (LLM)
ArchitectureN/A
Context Window16384 tokens
Max Output4096 tokens
InputText
OutputText
VisionSupported
Function CallingSupported

Pricing

Token TypeCost per Million Tokens
Input$0.1
Output$0.1

How to Use

  1. Write your prompt — describe the task, provide context, and specify desired output format.
  2. Submit — the model processes your request and returns the response.

API Integration

Base URL: https://llm.wavespeed.ai/v1 API Endpoint: chat/completions Model ID: microsoft/phi-4


API Usage

Python SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.wavespeed.ai/v1"
)

response = client.chat.completions.create(
    model="microsoft/phi-4",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

cURL

curl https://llm.wavespeed.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "microsoft/phi-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Notes

  • Model: microsoft/phi-4
  • Provider: Microsoft

Info

Penyediamicrosoft
Tipellm

Fitur yang Didukung

Input
Teks
Output
Teks
Konteks16,384
Output Maks16,384
Vision-
Function Calling-

Panduan Akses API

Base URLhttps://llm.wavespeed.ai/v1
API Endpointchat/completions
Model IDmicrosoft/phi-4

Phi 4 API

microsoft/phi-4

Microsoft Research 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...

Input

$0.065 /M

Output

$0.14 /M

Konteks

16K

Output Maks.

16K

Coba Phi 4 di WaveSpeedAI

Akses Phi 4 melalui API terpadu kami — kompatibel dengan OpenAI, tanpa cold start, harga transparan.

Pertanyaan Umum tentang Phi 4

Berapa biaya Phi 4 melalui API?+

Harga di WaveSpeedAI: $0.07 per juta token input dan $0.14 per juta token output. Prompt caching dan batch processing ditagih terpisah dan mengurangi biaya efektif pada beban kerja yang panjang dan berulang.

Berapa context window Phi 4?+

Phi 4 mendukung hingga 16K token konteks dengan hingga 16K token output per permintaan.

Apakah Phi 4 kompatibel dengan OpenAI?+

Ya. WaveSpeedAI menyediakan Phi 4 melalui endpoint yang kompatibel dengan OpenAI di https://llm.wavespeed.ai/v1. Arahkan OpenAI SDK resmi ke base URL ini dengan API key WaveSpeedAI Anda — tanpa perubahan kode lainnya.

Bagaimana memulai dengan Phi 4?+

Masuk ke WaveSpeedAI, buat API key di Access Keys, lalu kirim permintaan ke https://llm.wavespeed.ai/v1/chat/completions dengan model id seperti ditampilkan di atas. Akun baru menerima kredit gratis untuk menguji Phi 4.

API LLM terkait