Features
Latency & SchedulingChoose how a chat completion is processed on DEVUP AI: Priority for faster processing, or Flex for a lower price when your workload can wait.
Every chat completion runs on one of three tiers. Pick the tier per request with the service_tier field. Each model page lists the tiers it supports and their prices.
Priority requests are scheduled ahead of standard requests for the same model. This shortens waiting time when a model is under heavy demand, which helps interactive and latency-sensitive workloads such as chat interfaces, coding agents, and multi-step pipelines where every call adds to the total time. When a model is not busy, response times on both tiers are similar.
Priority is available on selected models. A model that supports it shows its Priority prices on its model page.
Add "service_tier": "priority" to the request body.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_DEVUP_API_KEY",
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash",
service_tier="priority",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.service_tier)
print(response.choices[0].message.content)If your SDK version does not accept service_tier as a named argument, pass it through the SDK's extra-body option, for example extra_body={"service_tier": "priority"} in Python.
service_tier in the response to confirm the tier and reconcile your costs.Flex processing runs your request at a lower price per token, in exchange for a longer wait. A Flex request waits for available capacity before processing starts. The wait is usually tens of seconds and can reach several minutes when demand is high. Once processing starts, the response is generated at normal speed.
Flex is designed for work that does not need an immediate answer. For interactive use, send the request without service_tier, or with "service_tier": "priority".
Add "service_tier": "flex" to the request body of /v1/chat/completions.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_DEVUP_API_KEY",
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash",
service_tier="flex",
messages=[{"role": "user", "content": "Hello!"}],
timeout=300,
)
print(response.service_tier)
print(response.choices[0].message.content)Set your client timeout to at least 300 seconds. Many HTTP clients default to 60 seconds or less and will close the connection while a Flex request is still waiting.
If a Flex request has not started processing within 240 seconds, it returns HTTP 429 with the error code flex_capacity_unavailable and a Retry-After: 60 header. A Flex request can also return 429 earlier when no capacity is available. You are not charged for a request that returns 429. Retry after the indicated delay, or send the request without service_tier to use the standard tier.
With "stream": true, the wait happens before the first chunk. Once the first chunk arrives, the rest of the stream follows at normal speed.
Every response includes a top-level service_tier field with the tier that actually processed the request: "priority", "flex", or "default".
{
"object": "chat.completion",
"model": "deepseek-ai/DeepSeek-V4-Flash",
"service_tier": "priority",
"choices": [ ... ],
"usage": { "prompt_tokens": 12, "completion_tokens": 48, "total_tokens": 60 }
}Streaming. When stream is true, the chunks carry service_tier. The first chunk may report null. Use the value from the last chunk.
service_tier: Priority prices for "priority", Flex prices for "flex". If a request is processed on the standard tier, it is billed at standard prices. Each model page lists its Priority and Flex prices._devup.cost_dzd in the response shows the amount charged.| Value | Behaviour |
|---|---|
| omitted | Standard tier, standard prices. |
| "priority" | Priority on models that support it. On other models, the request is processed on the standard tier at standard prices, with no error. |
| "flex" | Flex processing on models that support it. On other models, the request is processed on the standard tier. |
| any other value | Processed on the standard tier at standard prices. |
Priority is available on the Chat Completions endpoint.