Generate Unity REST API clients. Create typed models and endpoints, check compatibility, and connect APIs without writing networking boilerplate.
Connect your Unity project to REST APIs without manually writing request classes, URL-building logic, JSON models or repetitive networking code.
REST SDK Generator imports an OpenAPI or Swagger specification and generates a strongly typed C# SDK that is ready to use in your Unity project. It is designed for developers with little or no previous API experience, while still providing the configuration, diagnostics and extensibility required by more experienced teams.
Use the guided Beginner Quick Start workflow to:
- Import an OpenAPI specification from a JSON or YAML file, or download it from a URL.
- Review API endpoints, models and compatibility warnings.
- Generate typed C# models and API client classes.
- Copy or save a ready-made MonoBehaviour example showing how to call an endpoint.
Instead of manually creating UnityWebRequest calls such as URLs, headers, query strings, request bodies and JSON deserialisation, you can call generated methods such as:
ApiResponse<Player> response = await sdk.Players.GetPlayerAsync(playerId)
This product is an independent third-party tool and is not affiliated with, endorsed by, or sponsored by the OpenAPI Initiative or the Linux Foundation. ‘OpenAPI’ is used solely to describe compatibility with the OpenAPI Specification.
KEY FEATURES
• Beginner-friendly four-step setup workflow
• OpenAPI 3.0 and common OpenAPI 3.1 support
• JSON and YAML specification import
• Download specifications directly from a URL
• Generate strongly typed C# models and enums
• Generate GET, POST, PUT, PATCH, DELETE and HEAD methods
• Path, query and header parameter support
• JSON request-body generation
• Typed API responses and structured error handling
• Bearer token, API key and Basic Authentication providers
• Development, staging and production environment profiles
• Built-in UnityWebRequest transport
• Request cancellation, timeout and retry handling
• API compatibility analysis before generation
• Clear warnings for unsupported OpenAPI features
• API Explorer and raw request-testing tools
• Generated MonoBehaviour call examples
• Mock transport support for development and testing
• Safe regeneration with generated-file manifests
• IL2CPP preservation file generation
• No external hosted service or subscription required
SUITABLE FOR
• Player accounts and profiles
• Leaderboards and achievements
• Inventories and item databases
• Cloud saves
• Storefronts and game economies
• Content-management systems
• Public data APIs
• ASP.NET Core backends
• Internal studio tools
• Prototypes that need to connect to an existing service
BEGINNER FRIENDLY
You do not need to understand every part of HTTP networking before getting started. The included Quick Start window explains specifications, base URLs, endpoints, models, parameters, authentication and responses as you work through the generation process.
The package also generates example scripts that demonstrate SDK creation, endpoint calls, cancellation and error handling.
IMPORTANT
This package generates clients for REST APIs described by an OpenAPI specification. It does not create or host an API backend.
GraphQL, SOAP, gRPC, WebSockets and APIs without an OpenAPI specification are not automatically supported.
Advanced features such as multipart uploads, binary streaming, complex polymorphic schemas and complete browser-based OAuth login flows may require custom implementation. The compatibility report identifies unsupported or partially supported features before generation.
PACKAGE TYPE
Unity Package Manager package containing Editor tooling, runtime networking infrastructure, generated-code utilities, tests, documentation and samples.
MINIMUM UNITY VERSION
Unity 2022.3 LTS
Designed for use with Unity 2022.3 LTS and Unity 6 projects.
DEPENDENCY
• com.unity.nuget.newtonsoft-json
The generated runtime uses Newtonsoft.Json for JSON serialisation and deserialisation.
SUPPORTED SPECIFICATION INPUTS
• OpenAPI 3.0 JSON
• OpenAPI 3.0 YAML
• Common OpenAPI 3.1 JSON and YAML constructs
• Local TextAsset specification files
• Remote specification URLs
• ASP.NET Core Swagger/OpenAPI endpoints
The included dependency-free YAML parser supports the common YAML structures used by OpenAPI documents, including nested mappings, sequences, flow collections, multiline strings and block scalars.
YAML anchors, aliases, custom tags and complex mapping keys are not currently supported. Specifications using these features can be converted to JSON.
LIVE API ACCURACY
Generated code is based on the supplied OpenAPI specification. If an API returns JSON that differs from its specification, model adjustments may be required.
Deserialisation errors include the underlying serializer message and JSON path to help identify mismatched fields.
PLATFORM NOTES
The runtime uses UnityWebRequest and is designed for Unity-supported platforms. WebGL requests remain subject to the target API’s CORS policy.
Customers should test their generated SDK on every platform they intend to support, particularly WebGL, Android, iOS and IL2CPP builds.