← Openai Interview Insights

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

Senior
Apr 2026

Summary

Did a system design round for a mobile engineer role at OpenAI. The problem was interesting but had a lot of moving parts, and I wasn't totally sure how deep to go on each layer.

Questions Asked (1)

Q1

Design an API and mobile architecture to control and limit user access counts per model version in a ChatGPT-like product. When a user hits their limit, display a toast showing the wait time until next free access, and include a link to upgrade to paid. Cover endpoint design, mobile-side patterns, and function signatures.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

This one had more layers than I expected going in.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a RESTful API with endpoints for checking and consuming access, and finally outline mobile-side patterns for handling limits and displaying the toast. Emphasize idempotency, caching, and graceful degradation.

Pro tip: Demonstrate awareness of race conditions and offline scenarios by proposing idempotency keys and client-side caching with optimistic UI updates. This shows you think beyond the happy path and consider real-world mobile constraints.

1. Clarify Requirements and Constraints

Ask questions to understand the scope: Is the limit per user, per model version, or both? What defines a 'free access'? How is time until next access calculated? Are there different tiers (free, paid)? What are the mobile platform constraints (iOS/Android)?

2. Design API Endpoints

Propose endpoints such as GET /v1/models/{model_version}/access to check remaining accesses and reset time, and POST /v1/models/{model_version}/access to consume an access. Include idempotency keys and proper status codes (e.g., 429 for limit exceeded with Retry-After header).

3. Define Mobile-Side Patterns

Outline how the mobile app will handle access checks and limit responses: use a repository pattern to abstract API calls, cache access status locally, and handle 429 responses by showing a toast with wait time and upgrade link. Consider offline scenarios and optimistic UI.

4. Specify Function Signatures

Provide example function signatures for key mobile-side operations, such as checkAccess(modelVersion: String) async throws -> AccessStatus, consumeAccess(modelVersion: String, idempotencyKey: String) async throws -> AccessResult, and showLimitToast(waitTime: TimeInterval, upgradeURL: URL).

5. Discuss Trade-offs and Edge Cases

Address trade-offs like caching vs. real-time accuracy, handling race conditions with idempotency, and graceful degradation when offline. Mention how to handle time zone differences for reset times and how to ensure the toast is non-intrusive.

Key Points to Mention

  • Idempotency keys to prevent double consumption of accesses
  • Proper HTTP status codes (429 Too Many Requests) and Retry-After header
  • Client-side caching of access status with TTL to reduce API calls
  • Optimistic UI updates and handling of race conditions
  • Clear separation of concerns: API layer, repository, and UI layer
  • Accessibility and user experience for the toast notification (e.g., dismissible, non-blocking)

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