Amazon AWS, 280+ services
REST service SDKs covering S3, EC2, Lambda, DynamoDB, SQS, SNS, CloudFormation and more. Drop the unit into the project and call the service with typed request and response classes.
View AWS SDKs →Point sgcOpenAPI at an OpenAPI 3.x document. The parser reads it, the generator emits a native Object Pascal SDK, and the OpenAPI server component publishes your own endpoints back out as a live spec.
A specification in, Pascal out, and a server at either end. Narrated and captioned. Nothing downloads until you press play.
Turn a specification into Delphi code, and turn Delphi code into a running server.
You do not have to generate anything to get started. The four largest cloud platforms ship as ready-to-use Pascal SDKs inside sgcOpenAPI, generated from the official specifications and kept up to date.
REST service SDKs covering S3, EC2, Lambda, DynamoDB, SQS, SNS, CloudFormation and more. Drop the unit into the project and call the service with typed request and response classes.
View AWS SDKs →The largest set in the library. Azure VMs, Blob Storage, Functions, Cosmos DB, Key Vault and the rest of the Azure control plane, each one a generated Pascal client.
View Azure SDKs →Compute Engine, Cloud Storage, BigQuery, Pub/Sub, Cloud Functions and more.
View Google SDKs →Office 365, Microsoft Teams, OneDrive, Outlook and Active Directory, through the Graph API.
View Microsoft SDKs →If the API publishes an OpenAPI or Swagger document, the generator turns it into the same kind of typed Pascal unit. There is no allow list.
Generator features →Single, Team and Site all bundle the parser, the code generator, the OpenAPI server component and the whole pre-built SDK library. Nothing is sold separately.
All pre-built SDKs →Worked guides, from a public specification to a compiling Delphi client
Five steps, all of them inside the IDE. No Node.js, no Java code generator, no template engine to learn.
# one input, one output, and you have a unit
> sgcOpenAPI.exe -i "api.github.com.json" -o "github.pas" -a 2
File successfully created github.pas
# -a 2 wires up token auth -u sets the base url
# -x drops operations -p prunes the classes they used
# -s emits a server stub instead of a client
# exit 0 ok, 5 bad input, 6 bad output, 7 not convertible
uses
github; // the unit you just generated
procedure TForm1.btnReposClick(Sender: TObject);
var
oResponse: TsgcOpenAPI_reposlistforauthenticateduser_Response;
oRepo: TsgcOpenAPI_repository_Class;
begin
GetOpenAPIClient.Authentication.Token.BearerToken := 'ghp_...';
oResponse := GetOpenAPIClient.reposlistforauthenticateduser(
'private', 'owner', 'all', 'full_name', '', 100, 1);
try
if oResponse.IsSuccessful then
for oRepo in oResponse.Successful.Items do
Memo1.Lines.Add(oRepo.Full_name)
else
Memo1.Lines.Add(IntToStr(oResponse.ResponseCode) + ' ' +
oResponse.ResponseError);
finally
oResponse.Free;
end;
end;
uses
sgcHTTP_Server, sgcHTTP_OpenAPI_Server, sgcWebSocket_Server_API_OpenAPI;
procedure TForm1.btnStartClick(Sender: TObject);
begin
FServer := TsgcHTTPServer.Create(Self);
FServer.Port := 8080;
FOpenAPI := TsgcWSAPIServer_OpenAPI.Create(Self);
FOpenAPI.OpenAPIOptions.Endpoint.ServeSpec := True;
FOpenAPI.OpenAPIOptions.Endpoint.ServeSwaggerUI := True;
FOpenAPI.OpenAPIOptions.Validation.ValidateRequest := True;
FOpenAPI.LoadFromFile('petstore.json');
FOpenAPI.OnRequest := OnOpenAPIRequest;
FOpenAPI.Server := FServer;
FServer.Active := True;
end;
// one event, dispatched by operation id
procedure TForm1.OnOpenAPIRequest(Sender: TObject;
const aOperationId: string;
const aContext: TsgcOpenAPIServerContext;
var Handled: Boolean);
begin
Handled := True;
if aOperationId = 'getPetById' then
aContext.RespondJSON(200,
FPets.Values[aContext.PathParamAsString('petId')])
else
Handled := False;
end;
-i at a local file or a URL, in JSON or YAML. Both are read locally, and a Swagger 2.0 document is converted to OpenAPI 3 locally as well.TsgcOpenAPI reads the document into Paths, Components, Security, Servers, Tags and Info, and records everything it could not honour in Warnings. External $ref pointers are pulled in beforehand by TsgcOpenAPI_Bundle.TsgcOpenAPI_Parser_Client_Pascal descends from that reader and writes one Pascal unit: one method per operation, one response class per method, and a class for every schema, with the descriptions from the document as comments.Source folder, on Delphi 7 through RAD Studio 13. Typed responses need XE7 or later.GetOpenAPIClient, set the credentials on Authentication, and call the operation. The base URL is already baked in from the servers entry of the document.The generator descends from the reader, so you can also create TsgcOpenAPI yourself, walk the parsed model and build your own tooling on top of it. The parser component →
TsgcWSAPIServer_OpenAPI attaches to a TsgcHTTPServer, routes incoming requests against the document you loaded, validates them before your handler runs, and serves the document and a Swagger UI from the same port.

GET /pets/{petId} reaches your OnRequest handler with aOperationId set to getPetById. GET /openapi.json returns the document you loaded and GET /docs opens Swagger UI, both of them switched on by Endpoint.ServeSpec and Endpoint.ServeSwaggerUI. Endpoint.BasePath moves the pair under a prefix.

Load a JSON contract with LoadFromFile and dispatch on the operation id, or annotate a Pascal class with sgcServiceContract, sgcHttpGet, sgcRoute and sgcFromBody and let TsgcOpenAPICodeFirstScanner build the document. Code-First needs Delphi XE7 or later. Both demos ship in Demos\30.Server\.

Validation.ValidateRequest, ValidateRequired and ValidateRequestBody check the incoming request against the document before your handler runs. OnValidationError hands you the operation id and the list of failures, and a Continue flag that decides whether the request is rejected.

The securityScheme entries in the document drive OnValidateAPIKey, OnValidateBasic and OnValidateBearer. You write the credential lookup, the component parses the request and answers with the right status when the lookup says no.
The server runs on the same sgcWebSockets HTTP server that hosts your WebSocket endpoints and static files. One port, one TLS certificate, one logging stream. The OpenAPI server component →
One bundled product for Delphi and C++ Builder: an OpenAPI 3.x parser, a native Pascal SDK generator, an OpenAPI server component, and 1,195+ pre-built cloud SDKs. Full source, royalty-free deployment. Choose by team size.
One developer. Parser, generator, server component and every pre-built SDK.
Two developers. The same complete product as Single.
Unlimited developers. The same complete product as Single.
sgcOpenAPI is licensed on its own. Parser, code generator, server component and all 1,195+ pre-built SDKs are included in every tier.
Compare tiers and pricesTrusted by Delphi, C++ Builder, Lazarus and .NET developers around the world.
Your sgcWebSockets library is very useful and easy to setup. Keep up the good work!
sgcWebSockets is amazing and your support is the best!
Thanks so much for your help and support, I love your components.
Parser, code generator, OpenAPI server component and all 1,195+ pre-built cloud SDKs, on one licence. Full source, royalty-free deployment, Delphi 7 through RAD Studio 13.
sgcOpenAPI is one of the eSeGeCe component libraries for Delphi, C++ Builder and .NET. They share conventions, they ship with full source, and they deploy royalty-free.
WebSocket, HTTP/2, MQTT, AMQP, WebRTC, AI and 30+ API integrations. The HTTP server that the OpenAPI server component runs on.
REST server, OpenAPI server and OpenAPI client components for Delphi and C++ Builder. Publish REST APIs from an OpenAPI 3.x contract, or consume any OpenAPI-described API. Standalone, with the sgcWebSockets Core runtime bundled in.
Server-side HTML and UI components on Bootstrap 5 and htmx. Build the admin or dashboard UI for the REST clients you generate, without a JavaScript front end.
Raw QUIC transport and an HTTP/3 client and server, with WebTransport. Expose the REST clients you generate over a QUIC/HTTP-3 transport for lower connection latency.
XAdES, PAdES, CAdES and ASiC for documents, Authenticode, ClickOnce, NuGet and VSIX for code. Sign the request and response bodies your API exchanges.
Create, edit, view, sign, redact and validate PDF files in pure Object Pascal, with no DLL to deploy. Licensed on its own.
Updated Indy TCP/IP components with modern TLS, IPv6 and HTTP/2 for Delphi 7 through 13. The transport layer under the generated clients.
Packs, add-ons and more