Mafdet AI Help Center中文

Models overview

Mafdet AI serves models from several providers behind one base URL, https://api.mafdet.ai/v1. Which endpoint you call depends on what the model does — a model only works on its own API surface.

API surfaces

SurfaceEndpointWhat it doesStatus
ChatPOST /v1/chat/completionsText, multimodal input, image generationGA
EmbeddingsPOST /v1/embeddingsText / image / video → vectorsGA
SpeechPOST /v1/audio/speechText → audioPreview
RealtimePlayground Live in the consoleLive voice conversationBeta, invite-only

Within the Chat surface you can swap models by changing the model field. Across surfaces you cannot: sending an embeddings model to /v1/chat/completions is rejected with model_api_surface_mismatch before the provider is called.

Realtime is not a public API — it runs in the console Playground for whitelisted organizations only.

Authentication and billing across surfaces

Authentication is identical on every HTTP surface: Authorization: Bearer sk-mafdet-…. One key works for Chat, Embeddings and Speech, subject to the models it is allowed to call.

Billing units differ, and this is where surfaces are not interchangeable:

SurfaceBilled on
Chat (incl. image generation)Input + output tokens
Embeddings — textInput tokens
Embeddings — imagePer image
Embeddings — videoPer second of video
SpeechText input tokens + audio output tokens

Which surfaces your plan can actually reach is on What your plan can use.

Choosing a model

  • Free trial: gemini-3-flash-lite (billed at $0)
  • Multimodal chat (image / PDF / audio / video in): the Gemini 2.5 and 3 families
  • Image generation: gemini-3-image, gemini-3-pro-image, gemini-3-flash-lite-image
  • Embeddings: gemini-embedding-2 (text), multimodal-embedding-1 (image / video)
  • Text to speech: gemini-2.5-flash-tts, gemini-2.5-pro-tts
  • Chinese / code / low cost: DeepSeek and Qwen families
  • Long context: Kimi (Moonshot) large-context variants

Available models

Chat

POST /v1/chat/completions

Google (Gemini)

ModelModel IDContext lengthPrice
Gemini 3.7 Flashgemini-3.7-flash1,048,576
text in $1.80 / 1M
text out $9.00 / 1M
Gemini 3 Progemini-3-pro1,048,576
text in $2.40 / 1M
text out $14.40 / 1M
Gemini 3 Flashgemini-3-flash1,048,576
text in $1.80 / 1M
text out $10.80 / 1M
Gemini 3 Flash-Lite (Trial)gemini-3-flash-lite1,048,576Free trial (no charge)
Gemini 2.5 Progemini-2.5-pro1,048,576
text in $1.50 / 1M
text out $12.00 / 1M
Gemini 2.5 Flashgemini-2.5-flash1,048,576
text in $0.36 / 1M
text out $3.00 / 1M
Gemini 2.5 Flash-Litegemini-2.5-flash-lite1,048,576
text in $0.12 / 1M
text out $0.48 / 1M
Gemini 3 Flash (Preview) (Preview)gemini-3-flash-preview1,048,576
text in $0.60 / 1M
text out $3.60 / 1M

DeepSeek

ModelModel IDContext lengthPrice
DeepSeek V4 Prodeepseek-v4-pro128,000
text in $1.584 / 1M
text out $4.752 / 1M
DeepSeek V4 Flashdeepseek-v4-flash128,000
text in $0.528 / 1M
text out $1.584 / 1M

Kimi / Moonshot

ModelModel IDContext lengthPrice
Kimi K3kimi-k31,048,576
text in $3.00 / 1M
text out $15.00 / 1M
Kimi K2.7 Codekimi-k2.7-code256,000
text in $0.60 / 1M
text out $2.30 / 1M
Kimi K2.7 Code Highspeedkimi-k2.7-code-highspeed256,000
text in $0.60 / 1M
text out $2.30 / 1M
Kimi K2.6kimi-k2.6256,000
text in $0.60 / 1M
text out $2.30 / 1M
Kimi K2.5kimi-k2.5256,000
text in $0.60 / 1M
text out $2.30 / 1M
Kimi v1 128Kkimi-128k131,072
text in $8.50 / 1M
text out $8.50 / 1M
Kimi v1 32Kkimi-32k32,768
text in $3.40 / 1M
text out $3.40 / 1M
Kimi v1 Autokimi-auto131,072
text in $1.70 / 1M
text out $1.70 / 1M
Kimi v1 8Kkimi-8k8,192
text in $1.70 / 1M
text out $1.70 / 1M

Qwen

ModelModel IDContext lengthPrice
Qwen Maxqwen-max32,768
text in $0.34 / 1M
text out $1.34 / 1M
Qwen Plusqwen-plus131,072
text in $0.11 / 1M
text out $0.28 / 1M
Qwen Flashqwen-flash1,000,000
text in $0.08 / 1M
text out $0.20 / 1M
Qwen Longqwen-long1,000,000
text in $0.07 / 1M
text out $0.14 / 1M

Image generation

POST /v1/chat/completions

ModelModel IDContext lengthPrice
Gemini 3 Flash Imagegemini-3-image1,048,576
text in $0.60 / 1M
text out $72.00 / 1M
Gemini 3 Pro Imagegemini-3-pro-image1,048,576
text in $2.40 / 1M
text out $144.00 / 1M
Gemini 3 Flash-Lite Imagegemini-3-flash-lite-image1,048,576
text in $0.30 / 1M
text out $36.00 / 1M

Embeddings

POST /v1/embeddings

ModelModel IDContext lengthPrice
Gemini Embedding 2gemini-embedding-22,048
text in $0.24 / 1M
Multimodal Embedding 1multimodal-embedding-12,048
per image $0.00012 / image
per second $0.00060 / second

Text to speech

POST /v1/audio/speech

ModelModel IDContext lengthPrice
Gemini 2.5 Flash TTS (Preview)gemini-2.5-flash-tts8,192
text in $0.60 / 1M
audio out $12.00 / 1M
Gemini 2.5 Pro TTS (Preview)gemini-2.5-pro-tts8,192
text in $1.20 / 1M
audio out $24.00 / 1M

Live voice

Playground Live (console, invite only)

ModelModel IDContext lengthPrice
Gemini Live (Native Audio) (Beta)gemini-live-native-audio32,000
text in $0.60 / 1M
text out $2.40 / 1M
audio in $3.60 / 1M
audio out $14.40 / 1M

Access notes

Each model requires an access tier (FREE / PAID / TRUSTED / ENTERPRISE), and your subscription plan grants tiers separately for the Playground and for API keys — on Starter the Playground can use every public model while an API key can only call the free model. A MODEL_NOT_ALLOWED response means that gate; see Subscription plans and Permissions & model scope.

Pricing

Listed prices are the prices Mafdet charges you, in the unit shown for each model — per 1M tokens for text, per image for image embedding, per second for video embedding. Prices may change; the price in effect at call time and your usage records are authoritative.

One price, all the time. Each model has a single input price and a single output price. Every prompt token is billed at that input price — there is no separate cache-hit rate — and the price does not vary by time of day, even where the upstream provider varies its own rates by the hour.

An image is not a million tokens. The image models are priced per 1M output tokens like everything else, but their output is image tokens and one picture is a fixed ~1,120 of them — so gemini-3-image at $72 / 1M works out to about $0.08 per image, and gemini-3-pro-image at $144 / 1M to about $0.16. Worked through in Image generation.

Thinking counts as output. gemini-3.7-flash reasons before it answers, and those tokens are billed at the output price like any other — a one-word reply can still cost a hundred output tokens. They also come out of max_tokens: set it too low and the whole budget goes to reasoning, leaving an empty reply you still pay for. Leave max_tokens unset, or give it room.

Provider list prices are the source we calibrate against, not what you are billed: