翻篇收录说明
翻篇网页快照

Serverless inference overview - Fireworks AI Docs

https://docs.fireworks.ai/serverless/overview

最近抓取:2026-12-04 03:40:44(北京时间)

最近内容变化:2026-12-04 03:40:44(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

How Serverless inference works on Fireworks: serverless modes (including Spot), per-token billing, request headers, prompt caching, model lifecycle, and when to pick Serverless.

正文摘录

What is Serverless inference Serverless Inference is multi-tenant inference for popular open models running on Fireworks-managed infrastructure. You point your client at api.fireworks.ai, send tokens, and pay only for what you use — no GPUs to size, no autoscaler to tune, no cold starts to wait through. Models eligible for Serverless carry the Serverless tag in the model library. To make your first call, see the Serverless quickstart. Serverless products at a glance Six modes run on the same Serverless framework. They route and price differently. Standard, Priority, Fast, and Ultra-fast share the same rate-limit policy. Preview offerings have their own limits (see Serverless rate limits), and Spot has its own limit that adjusts with available capacity. ModeUse caseSpeed vs StandardAvailabilityPrice vs StandardStandardGeneral use. The default; no service_tier parameter needed.BaselineBaselineBaselinePriorityWorkloads that require higher reliability during peak traffic. Set service_tier: "priority".—Prioritized above Standard and less likely to be load shed (503)HigherFastInteractive applications that require fast response speeds. Use a Fast model ID.Aims for 100+ tokens per second of generated throughput. Same model and quality.—HigherUltra-fastHighly latency-sensitive applications. Use an Ultra-fast model ID.Aims for 3-6x generation speed (up to 8x for agentic coding tasks). Same model and quality.—HigherFlexCost-sensitive workloads that can tolerate slower speeds. Use a Flex model ID.Slower—50% of StandardSpotWork that doesn’t need an immediate answer: evals, data generation, background and batch-style jobs, and routers. Set service_tier: "spot". Available on GLM 5.3, Kimi K3, DeepSeek V4.1 Flash, and DeepSeek V4.1 Flash 1017 currently.Same model and quality as StandardBest-effort50% of Standard For usage examples and the full list of supported models, see Serverless Modes. For pricing by mode, see Serverless pricing. Billing Serverless is priced per token. Three dimensions are billed: Input tokens — what you send to the model. Cached input tokens — input tokens served from prompt cache, discounted (default 50% of input on text and vision models, unless a model lists a different cached rate). Generated tokens — what the model produces. Decision models such as Rune 26B-A4B are billed on input only: they return calibrated probabilities for typed questions and never generate tokens. Other things to know: The usage object in each response is the source of truth for what was billed (prompt_tokens, completion_tokens, total_tokens). Your spend tier influences Serverless capacity caps. Your monthly spend limit is a separate account control. Higher spend tiers unlock higher TPM upper bounds. See Account quotas and Serverless rate limits. Request and response headers Headers a Serverless caller will set or read. Request headers HeaderNotesAuthorization: Bearer $FIREWORKS_API_KEYRequired for all requests.x-session-affinityOptional sticky-routing key that pins requests with the same ID to the same replica. See Prompt caching. Response headers Fireworks sets the following on Serverless inference responses. The rate-limit headers are included only when that limit is known: HeaderWhat it tells youfireworks-prompt-tokensInput tokens for the request.fireworks-cached-prompt-tokensCached portion of the input. See Prompt caching.X-Ratelimit-Limit-Tokens-PromptLatest known Total Prompt TPM (tokens per minute) limit.X-Ratelimit-Limit-Tokens-Uncached-PromptLatest known Uncached Prompt TPM limit.X-Ratelimit-Limit-Tokens-GeneratedLatest known Generated TPM limit.X-Ratelimit-Limit-Tokens-Cache-Adjusted-PromptLatest known cache-adjusted prompt limit. This is separate from Uncached Prompt TPM. X-Ratelimit-Limit-Tokens-Prompt, X-Ratelimit-Limit-Tokens-Uncached-Prompt, and X-Ratelimit-Limit-Tokens-Generated show the latest known effective limit in tokens per minute, which can lag a recent change. Elastic Burst can raise those three above the published base ceilings. It does not apply to X-Ratelimit-Limit-Tokens-Cache-Adjusted-Prompt. Streaming responses don’t carry per-request perf headers. To get the same metrics in the streaming response body, set the perf_metrics_in_response parameter on the request. See Querying text models. Prompt caching Prompt caching is on by default for every Serverless model. Cached input tokens are billed at the discounted rate. If you pass a stable ID in x-session-affinity (or prompt_cache_key or user), Fireworks prioritizes it and routes requests with that ID to the same replica. Without one, Fireworks falls back to best-effort KV cache aware routing. For the full guide, including how to structure prompts for cache hits and how to read cache metrics, see Prompt caching. Serverless model lifecycle Serverless models are managed by the Fireworks team and may be updated or deprecated as new models are released. We provide at least 2 weeks advance notice before removing any model, with longer notice periods for popular models based on usage. For production workloads requiring long-term model stability, we recommend on-demand deployments, which give you full control over model versions and updates. Serverless vs on-demand When Serverless fitsWhen On-demand fitsPay per token, only for what you usePay per GPU-hour for dedicated capacityYou’re using popular base models that Fireworks already hosts, or LoRAs on select base models with Specialized Model Inference (in Preview, available on request)You’re running custom base models, or LoRAs on base models that serverless doesn’t supportYou don’t want to manage scaling, replicas, or hardware sizingYou have custom latency requirements and want control over hardware and replicas For dedicated infrastructure, see On-demand deployments. Next steps Serverless quickstartMake your first Serverless API call.Serverless ModesHigher-reliability, higher-speed, and lower-cost modes.US-only ServerlessDedicated US routers for inference residency.PricingPer-token rates for text, vision, embeddings, Priority, and Spot.Reserved ThroughputSLA-backed throughput that adds to your adaptive rate limits.Rate limitsAdaptive TPM bounds and how the limit ramps with usage.Prompt cachingHow caching works and how to maximize hit rate.On-demand deploymentsDedicated GPUs for predictable throughput and custom models.Was this page helpful?YesNo⌘I