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
Realtimewss://api.mafdet.ai/v1/realtimeLive voice, realtime transcriptionBeta

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 the one surface that is not a plain HTTP request: you exchange your key for a one-time ticket, then open a WebSocket with it. See Realtime (WebSocket).

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-k3 (1M), and the kimi-k2.6 / kimi-k2.7-code family (256K)

Available models

Chat

POST /v1/chat/completions

Google (Gemini)

ModelModel IDContext lengthPrice
Gemini 3.8 Flashgemini-3.8-flash1,048,576
text in $1.80 / 1M
text out $9.00 / 1M
Gemini 3.7 Flashgemini-3.7-flash1,048,576
text in $1.80 / 1M
text out $9.00 / 1M
Gemini 3.5 Transcribe (Preview) (Preview)gemini-3.5-transcribe90,000
text in $3.00 / 1M
text out $14.40 / 1M
Gemini 3 Pro (Preview) (Preview)gemini-3-pro1,048,576
text in $4.80 / 1M
text out $21.60 / 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 $3.00 / 1M
text out $18.00 / 1M
Gemini 2.5 Flashgemini-2.5-flash1,048,576
text in $1.20 / 1M
text out $3.00 / 1M
Gemini 2.5 Flash-Litegemini-2.5-flash-lite1,048,576
text in $0.36 / 1M
text out $0.48 / 1M
Gemini 3 Flash (Preview) (Preview)gemini-3-flash-preview1,048,576
text in $1.20 / 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.1 Flashdeepseek-v4-flash128,000
text in $0.36 / 1M
text out $1.44 / 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.975 / 1M
text out $4.05 / 1M
Kimi K2.7 Code Highspeedkimi-k2.7-code-highspeed256,000
text in $1.95 / 1M
text out $8.10 / 1M
Kimi K2.6kimi-k2.6256,000
text in $0.975 / 1M
text out $4.05 / 1M

Qwen

ModelModel IDContext lengthPrice
Qwen Maxqwen-max32,768
text in $0.36 / 1M
text out $1.44 / 1M
Qwen Plusqwen-plus131,072
text in $0.72 / 1M
text out $9.60 / 1M
Qwen Flashqwen-flash1,000,000
text in $0.18 / 1M
text out $1.80 / 1M
Qwen Longqwen-long1,000,000
text in $0.075 / 1M
text out $0.30 / 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.18 / 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) (Preview)gemini-2.5-flash-tts8,192
text in $0.60 / 1M
audio out $12.00 / 1M
Gemini 2.5 Pro TTS (Preview) (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) (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
Gemini 3.5 Transcribe Live (Preview) (Preview)gemini-3.5-transcribe-live32,000
text in $4.20 / 1M
text out $25.20 / 1M
audio in $4.20 / 1M
audio out $25.20 / 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.

Preview and Beta models

Some model names carry (Preview) or (Beta). That marks the upstream model as one its provider has not yet declared generally available: its behaviour can change, and the provider can withdraw it. Billing and access work exactly as they do for any other model, and the price shown here is the price you are charged.

The console Playground's Live interface is separately invite-only while it is in beta; that whitelist does not apply to the API.

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, flat. Each model has a single input price and a single output price, and none of the following changes it — even where the upstream provider does charge by exactly these:

  • Not the time of day. Some providers run peak and off-peak rates; we do not.
  • Not the size of the request. Providers often move a request to a dearer tier once its input passes some length, and charge every token in it at that rate. We do not.
  • Not the input modality. Audio, image and video input frequently cost several times text upstream. Here they bill at the same input price.
  • Not cache hits. Every prompt token bills at the input price; there is no separate cache-hit rate.

The number on the page is the number you are charged — there is no tier to work out in advance.

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.8-flash, gemini-3.7-flash and the kimi-k3 / kimi-k2.6 / kimi-k2.7-code family reason before they answer, 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. Measured: kimi-k2.6 spends 27 output tokens to answer "ok", and at max_tokens 16 it returns finish_reason length with empty content. Leave max_tokens unset, or give it room.

kimi-k3 accepts only temperature: 1. Any other value, 0 included, is rejected upstream with 400 invalid temperature: only 1 is allowed for this model, and the request is not billed. Leave it unset.

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