← all models

the model directory

Gemini 3.8 Flash vs Phi-4

compare api pricing, context windows, and capabilities side by side.

use the same workload to understand the cost before choosing a model.

prices are published impossibl api usage rates in usd. compare the billing units and context tiers alongside each price. unpublished capabilities are marked explicitly.

model pricing, capabilities, context limits, and retirement dates
specificationGemini 3.8 Flash

google/gemini-3.8-flash

Phi-4

microsoft/phi-4

creatorGoogleMicrosoft
model typeText generationText generation
input modalitiestext, image, audio, videotext
output modalitiestexttext
base input price$0.75 / 1m tokens$0.125 / 1m tokens
base output price$3.75 / 1m tokens$0.50 / 1m tokens
cached input price$0.075 / 1m tokensnot published
context window1.05m tokens16k tokens
tool callingnot publishednot supported
context pricing tiersnone publishednone published
endpoints
  • /v1/chat/completions
  • /v1/chat/completions
retirementnot announcednot announced

estimate your api cost

estimate text token usage across the same workload. all amounts are in usd.

token workload

total input, including cached tokens

include billable reasoning tokens

the same token usage in each request

a subset of total input, never additional tokens

Gemini 3.8 Flash

$2.625

estimated usage cost

1,000 requests × (1,000 uncached input × $0.75 + 500 output × $3.75) / 1,000,000 = $2.625

base rates; no context pricing tiers are published.

Phi-4

$0.375

estimated usage cost

1,000 requests × (1,000 uncached input × $0.125 + 500 output × $0.50) / 1,000,000 = $0.375

base rates; no context pricing tiers are published.

estimates use published impossibl api usage rates. configured billing adjustments, funding fees, taxes, and custom workspace rates are excluded and may change the final amount.

image and audio usage, cache creation, and additional tool charges are excluded. reasoning tokens count as billable output, even when they are not visible in the response.

Gemini 3.8 Flash vs Phi-4: side-by-side summary

Gemini 3.8 Flash and Phi-4 are available through the Impossibl API. They share the /v1/chat/completions endpoint. Set the model identifier to select the model for a supported request.

Gemini 3.8 Flash is created by Google. It has a 1,048,576-token context window. Base API pricing (USD): $0.75 per million input tokens; $3.75 per million output tokens.

Phi-4 is created by Microsoft. It has a 16,000-token context window. Base API pricing (USD): $0.125 per million input tokens; $0.50 per million output tokens.

context window

  • Gemini 3.8 Flash: 1,048,576 tokens
  • Phi-4: 16,000 tokens

price

  • Gemini 3.8 Flash: Base API pricing (USD): $0.75 per million input tokens; $3.75 per million output tokens.
  • Phi-4: Base API pricing (USD): $0.125 per million input tokens; $0.50 per million output tokens.

created by

  • Gemini 3.8 Flash: Google
  • Phi-4: Microsoft