AI API Uptime and Reliability: What to Check Before Buying
Every product you build on an AI API inherits that API's bad days. When the endpoint hangs, your chatbot hangs with it. A streaming response that opens successfully and then goes quiet looks to your user like a frozen screen, even though your monitoring logged a clean request.
That is why reliability diligence belongs before the purchase decision, not after the first incident review. Here is what to actually test, with runnable code you can point at any OpenAI-compatible provider today.
Why the advertised uptime number tells you almost nothing
A published percentage is a monthly average, and averages hide shape. One long outage and a thousand thirty-second hiccups can produce the same headline number while feeling completely different to your users. For interactive products, the many-small-failures version is far worse, because it breaks trust without ever triggering your incident process.
The number also says nothing about behavior under stress. When the platform is degraded, does your request queue, throttle predictably, or fail outright? And does the measurement exclude exactly the failures you would hit: auth errors during key rotation, rate limits at your concurrency, timeouts on long generations?
| Advertised availability | Rough monthly downtime (30-day month) |
|---|---|
| 99.99% | ~4 minutes |
| 99.9% | ~43 minutes |
| 99.5% | ~3.6 hours |
| 99.0% | ~7.2 hours |
The reliability checklist: eight things to verify before you buy
A public status page with timestamped incident history, not just a green badge someone can flip.
An error taxonomy: distinct rate-limit, server, and timeout signals, ideally with a Retry-After header.
A documented streaming contract, including what happens when the token stream stops mid-answer.
Visible per-key rate limits, so you can size concurrency before launch instead of during your first spike.
A degradation path: when capacity runs short, does the endpoint queue, throttle predictably, or just fail?
Transparent usage reporting, with cache and off-peak behavior explained rather than buried.
Access you can complete from your country, without a local phone number or bank account.
A human support channel with a stated response expectation, not a ticket void.
Check it yourself: a 50-call reliability probe
No provider's documentation will tell you how their API behaves from your region, at your concurrency, with your prompt sizes. Measure it. This script uses the OpenAI SDK, disables SDK-level retries so failures cannot be hidden from you, and reports a success rate plus latency percentiles and a failure breakdown.
import os, time, statistics
from openai import (OpenAI, APIConnectionError, APIStatusError,
APITimeoutError, RateLimitError)
client = OpenAI(
api_key=os.environ['AICREDITS_API_KEY'],
base_url='https://api.aicreditsapi.com/v1',
timeout=30.0,
max_retries=0, # we want to see every failure, not have the SDK hide it
)
def probe_once():
t0 = time.perf_counter()
try:
client.chat.completions.create(
model='deepseek-v4-flash',
messages=[{'role': 'user', 'content': 'Reply with the single word: ok'}],
max_tokens=4,
temperature=0,
)
return 'success', (time.perf_counter() - t0) * 1000
except RateLimitError:
return 'rate_limit', (time.perf_counter() - t0) * 1000
except APITimeoutError:
return 'timeout', (time.perf_counter() - t0) * 1000
except APIConnectionError:
return 'connection', (time.perf_counter() - t0) * 1000
except APIStatusError as e:
return 'http_%s' % e.status_code, (time.perf_counter() - t0) * 1000
results = []
for _ in range(50):
results.append(probe_once())
time.sleep(0.2)
latencies = sorted(ms for status, ms in results if status == 'success')
failures = {}
for status, _ in results:
if status != 'success':
failures[status] = failures.get(status, 0) + 1
print('success: %d/%d' % (len(latencies), len(results)))
if latencies:
print('p50 ms: %d' % statistics.median(latencies))
print('p95 ms: %d' % latencies[int(0.95 * (len(latencies) - 1))])
print('failures:', failures or 'none')
Run this at the hours you actually serve traffic, from the region you actually deploy in, and with realistic prompt lengths. A four-token ping is not the same load as summarizing a six-thousand-token document, and short prompts will make almost any provider look immaculate.
Then read the failure breakdown rather than just the success count. A few rate_limit responses is a sizing problem you can fix with concurrency limits. A steady drip of timeout or connection errors is a routing problem, and it will get worse as you scale into it.
Read the error taxonomy, then write retries that respect it
The best reliability signal a provider can give you is an honest error surface: a 429 that means slow down rather than a vague 500, and a 5xx that means your request was fine and you should try again. Test it deliberately by hammering the endpoint from a throwaway key, then make sure your client distinguishes the two cases.
import os, random, time
from openai import (OpenAI, APIConnectionError, APIStatusError,
APITimeoutError, RateLimitError)
client = OpenAI(
api_key=os.environ['AICREDITS_API_KEY'],
base_url='https://api.aicreditsapi.com/v1',
timeout=30.0,
max_retries=0, # this function does its own retrying
)
TRANSIENT = (RateLimitError, APITimeoutError, APIConnectionError)
def complete(messages, model='deepseek-v4-flash', attempts=4):
for attempt in range(attempts):
try:
return client.chat.completions.create(model=model, messages=messages)
except TRANSIENT:
pass
except APIStatusError as e:
if e.status_code < 500:
raise # 4xx: the request is wrong, retrying will not fix it
if attempt < attempts - 1:
time.sleep(min(2 ** attempt, 8) + random.uniform(0, 0.5))
return client.chat.completions.create(
model='deepseek-v4-pro', # stronger and costlier: last resort only
messages=messages,
)
Two details matter more than the backoff formula. First, jitter: without it, every client that fails at the same moment retries at the same moment, and you rebuild the spike you were trying to avoid. Second, the final fallback to deepseek-v4-pro should be a genuine last resort, not a default. Route everything to the stronger, costlier model after a hiccup and a brief outage quietly becomes a spend problem.
Never retry a 4xx. A 400 means the request is malformed and a 401 means the key is wrong; both will still be wrong four hundred milliseconds from now.
Streaming stalls: the outage users feel and dashboards miss
A stream that opens with a 200 and then stops producing tokens will not raise an error in most monitoring setups. Your dashboard is green and your user is staring at half a sentence. Guard against it with a read timeout, which the SDK applies to the gap between chunks rather than the whole request, and treat a mid-stream timeout as a recoverable event rather than a crash.
import os, time, httpx
from openai import OpenAI, APITimeoutError
client = OpenAI(
api_key=os.environ['AICREDITS_API_KEY'],
base_url='https://api.aicreditsapi.com/v1',
timeout=httpx.Timeout(60.0, connect=5.0, read=15.0), # 15s max gap between chunks
max_retries=0,
)
def stream_answer(prompt, model='deepseek-v4-flash'):
started = time.perf_counter()
ttft = None
parts = []
try:
for chunk in client.chat.completions.create(
model=model,
messages=[{'role': 'user', 'content': prompt}],
stream=True,
):
if not chunk.choices:
continue
piece = chunk.choices[0].delta.content
if piece:
if ttft is None:
ttft = time.perf_counter() - started
parts.append(piece)
except APITimeoutError:
return {'text': ''.join(parts), 'ttft_s': ttft, 'complete': False}
return {'text': ''.join(parts), 'ttft_s': ttft, 'complete': True}
Two rules follow from that return value. Keep whatever text arrived, because a partial answer is often useful and re-requesting the whole thing bills you twice for the same content. And decide what to do at the application layer: a chat interface can show the partial text with a continue action, while a machine pipeline can safely re-issue the call, since completions are stateless.
Aggregators vs. direct credits: a fair comparison
Routers like OpenRouter are genuinely good at one job: letting you try many models through a single key, with automatic failover between upstream providers. If you are still deciding which model fits your workload, that breadth is worth real effort saved, and the failover story is often better than anything you would build yourself in a week.
The tradeoff is distance. When you buy a routed request, you are buying a composite: the router's availability, the upstream provider's availability, and whatever route was selected for that specific call. Most days that is invisible. During an incident it is not, because you may see elevated errors without being able to tell whose they are, and your effective limits become a function of routing policy rather than your own account.
If DeepSeek is already the model you want, a direct credit balance is easier to reason about: one endpoint, one error surface, one set of limits you can probe and tune against with the script above. Aggregators are the better buy when you need breadth. Direct credits are the better buy when you need predictability.
Where AiCredits fits
AiCredits sells DeepSeek API credits to developers outside China, payable by card or PayPal, with no Chinese phone number or bank account required. That last detail is a reliability feature rather than a billing footnote: access that depends on a local identity document is a single point of failure you cannot engineer around.
You get two models behind the same base_url used in every sample above. deepseek-v4-flash is the default for nearly everything, because it is fast and inexpensive, which is why it appears in the probe, the retry helper, and the streaming wrapper. deepseek-v4-pro costs more and reasons better, so reserve it for the fallback path and for tasks where flash genuinely is not enough.
Pricing is usage-based and depends on how you call it: cache hits cost less than fresh input, off-peak hours cost less than peak ones, and pro costs more than flash. Current rates live at aicreditsapi.com/pricing. AiCredits also ships code linting tools if you would rather have retry and error-handling logic like the above checked automatically instead of by eye.
FAQ: buying decisions under uncertainty
No. A status page is observability; an SLA is a contractual remedy, usually service credits, with a defined trigger and a defined claims process. Read the definition of downtime and the claims window before you read the percentage.
Enough to cover your real usage window. A few hundred calls spread across the hours you serve, using realistic prompt sizes, will surface rate-limit and timeout behavior far better than a burst of ten from your laptop at midday.
Keep the partial text, mark the response incomplete, and decide at the application layer whether to show, continue, or re-issue. Do not blind-retry the full request, because you are generally billed for the tokens already generated.
No. Fall back to deepseek-v4-pro only when an answer is required and a retry has already failed. It is the stronger and costlier option, so making it your default turns transient errors into a spending pattern.
No. AiCredits is built for international developers: pay by card or PayPal, get a key, and call the same OpenAI-compatible base_url shown in the code samples.
Buy the failure behavior, not the uptime badge. Probe it, break it on purpose, and see what it says when it breaks.