← OpenAI Interview Insights

OpenAI·Mobile Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

System design round at OpenAI for a mobile engineer role. The question was a single sprawling prompt about quota handling for a GPT chat product, and it went deep fast. Felt like four interviews in one.

Questions Asked (1)

Q1

Design the full error-handling flow for when a free-tier user hits their message quota on a GPT chat service. This includes the API contract (HTTP status, error body, retry-after, upgrade hints, idempotency), how the client UI surfaces and recovers from the error, how different content types (text, image, voice, file, multimodal) are weighted against the quota, and edge cases like partial sends and mid-stream response cutoffs.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This was a lot to hold in your head at once.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining a clear API contract for quota exhaustion, including HTTP status, error body structure, and retry-after semantics, then walk through the client-side handling for each content type and edge case. Emphasize idempotency and graceful recovery, especially for partial sends and mid-stream cutoffs, and tie everything back to mobile-specific constraints like offline handling and battery/network efficiency.

Pro tip: Show you understand that quota errors are not just HTTP 429s—they're a product surface. Propose a consistent error taxonomy and client-side caching of quota state to avoid redundant requests, which demonstrates maturity beyond just API design.

1. Define the API contract

Specify HTTP status (e.g., 429 with a custom error code), error body schema (quota details, upgrade URL, retry-after), and idempotency keys for safe retries. Include how retry-after is computed and whether it's per-user or per-content-type.

2. Design client-side error surfacing and recovery

Describe how the mobile UI displays the quota error (e.g., inline banner, modal with upgrade CTA), how it handles retry-after (countdown, disabled send button), and how it recovers (auto-retry after delay, manual retry, upgrade flow).

3. Weight content types against quota

Explain how text, image, voice, file, and multimodal inputs consume quota differently (e.g., token-based for text, size-based for files, duration-based for voice) and how the API communicates remaining quota per type.

4. Handle edge cases: partial sends and mid-stream cutoffs

Address what happens when a request is partially sent (e.g., large file upload) or a streaming response is cut off due to quota exhaustion—include idempotency, resumability, and client-side state reconciliation.

5. Incorporate mobile-specific considerations

Discuss offline queuing, network retries with exponential backoff, battery-efficient polling for quota updates, and how to avoid duplicate sends when the app is backgrounded.

Key Points to Mention

  • HTTP 429 with a structured error body including error code, message, retry_after, and upgrade_url
  • Idempotency keys for safe retries, especially for partial sends and streaming requests
  • Client-side quota state caching and optimistic UI updates to reduce redundant API calls
  • Content-type-specific quota weighting (e.g., tokens for text, bytes for files, seconds for voice)
  • Graceful degradation for mid-stream cutoffs: resume tokens, partial response handling, and user notification
  • Mobile constraints: offline queuing, exponential backoff, and battery-efficient retry strategies

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.