PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/NVIDIA

Design and explain robust web APIs for ML inference

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's proficiency in designing HTTP REST APIs for ML inference, including API endpoints, versioning, idempotency, request/response schemas, authentication/authorization, rate limiting, observability, and backward-compatibility policies, and it falls under the Coding & Algorithms domain for a data scientist role.

  • hard
  • NVIDIA
  • Coding & Algorithms
  • Data Scientist

Design and explain robust web APIs for ML inference

Company: NVIDIA

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: hard

Interview Round: HR Screen

Design an HTTP API to serve image-based model predictions. Include: 1) Endpoints (e.g., POST /v1/predict, GET /v1/jobs/{id}/status), methods, idempotency, and versioning. 2) Request/response schemas (JSON + multipart), content types, standard error codes, and retry semantics with exponential backoff and idempotency keys. 3) Authentication/authorization (OAuth2/OIDC with scopes), rate limiting/quotas, and audit logging. 4) Backward compatibility and a deprecation policy. 5) Security (TLS, input validation, JWT verification), PII handling, and observability (structured logs, metrics, tracing, request IDs). 6) Provide a concise OpenAPI 3.0 snippet for one endpoint that captures parameters, schema, and error responses.

Quick Answer: This question evaluates a candidate's proficiency in designing HTTP REST APIs for ML inference, including API endpoints, versioning, idempotency, request/response schemas, authentication/authorization, rate limiting, observability, and backward-compatibility policies, and it falls under the Coding & Algorithms domain for a data scientist role.

Related Interview Questions

  • Return all file paths via DFS - NVIDIA (easy)
  • Implement a disk space manager with eviction - NVIDIA (medium)
  • Implement short algorithms on logs, grids, and strings - NVIDIA (hard)
  • Implement encode/decode for list of strings - NVIDIA (easy)
  • Solve small string and API tasks - NVIDIA (medium)
NVIDIA logo
NVIDIA
Oct 13, 2025, 9:49 PM
Data Scientist
HR Screen
Coding & Algorithms
1
0

Design an HTTP API for Image-Based Model Predictions

Context: Design an HTTP REST API that serves predictions for image inputs (e.g., classification, detection). Assume the service may need both synchronous and asynchronous inference, and will be consumed by first- and third-party clients.

Requirements

  1. Endpoints, Methods, Idempotency, and Versioning
  • Define core endpoints (e.g., POST /v1/predict for sync, POST /v1/jobs for async, GET /v1/jobs/{id}/status).
  • Specify HTTP methods and how idempotency is achieved (e.g., Idempotency-Key header).
  • Define versioning strategy.
  1. Request/Response Schemas, Content Types, Errors, Retries
  • Provide JSON and multipart request/response schemas and content types.
  • Define standard error codes and error schema.
  • Define retry semantics, exponential backoff, and use of idempotency keys.
  1. AuthN/AuthZ, Rate Limiting/Quotas, Audit Logging
  • Use OAuth2/OIDC with scopes.
  • Describe rate limiting and quotas.
  • Describe audit logging requirements.
  1. Backward Compatibility and Deprecation Policy
  • State which changes are backward compatible and how deprecations are communicated.
  1. Security and Observability
  • TLS, input validation, JWT verification.
  • PII handling.
  • Structured logs, metrics, tracing, request IDs.
  1. Provide a concise OpenAPI 3.0 snippet for one endpoint showing parameters, schema, and error responses.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More NVIDIA•More Data Scientist•NVIDIA Data Scientist•NVIDIA Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.