kiota is a free, open source api development & testing project written in C# and released under MIT. It has 3,844 GitHub stars, 346 forks and 222 open issues, and was last pushed 3 days ago. On this registry it ranks #65 of 186 tracked projects in API Development & Testing, with 5 head-to-head comparisons available. It gained 22 stars over the last 30 tracked days.

What is kiota?

Kiota is a command line tool from Microsoft that generates a strongly typed HTTP API client from any OpenAPI-described API, aimed at developers who would otherwise need to learn and take a dependency on a separate SDK for every HTTP API they call.

What it is

Kiota is an OpenAPI-based HTTP client code generator distributed as a CLI, written in C# and released under the MIT licence. It builds on top of the Microsoft.OpenAPI.NET library so that APIs described with OpenAPI get comprehensive support, and it exposes generation options through a documented parameter reference. The project's stated goal is to offer the best possible code generator support for OpenAPI and JSON Schema features, and its conceptual documentation lives at learn.microsoft.com/openapi/kiota.

The concrete problem it solves is SDK sprawl. Consuming many HTTP APIs traditionally means taking a dependency on a distinct, hand-written SDK for each one, each with its own conventions, its own release cadence, and its own library to learn. Kiota replaces that per-API SDK dependency with a generated client: the API client is produced from the API's own OpenAPI description, and it offers a strongly typed, fluent calling experience with the features expected from a high quality API SDK, without forcing the developer to learn a new library for every HTTP API.

Key capabilities

  • Generates an API client from any OpenAPI-described API, with OpenAPI 3 and the OpenAPI Specification listed among the project topics.
  • Fluent, strongly typed generated clients, so calls are made against typed models rather than raw HTTP handling.
  • Serialization support documented for FORM, JSON, MULTIPART and TEXT content types across the language packages.
  • Authentication abstractions including AnonymousAuthenticationProvider and ApiKeyAuthenticationProvider, plus an Azure authentication package.
  • HTTP transport through the httpClient component of the kiota-dotnet repository.
  • Built on the Microsoft.OpenAPI.NET library to cover OpenAPI and JSON Schema features.
  • Generation targets documented per language, with C# marked complete and Dart marked as work in progress, and topics listing csharp, dotnet, golang and java.

Who uses it and how

  • .NET and C# teams that call several HTTP APIs and want one generated, strongly typed client style instead of a different vendor SDK per service.
  • Services authenticating to Microsoft-hosted APIs, using the Azure authentication provider alongside the generated client.
  • Developers working in the Java and Go ecosystems, both listed as topics for the project's generation targets.
  • API owners who publish an OpenAPI description and want consumers to generate their own client rather than wait for a hand-maintained SDK.
  • Contributors participating through the repository's hacktoberfest topic, with Dotnet and CodeQL workflows gating changes.

Getting started

Get Kiota using one of the installation options documented at https://learn.microsoft.com/openapi/kiota/install, then generate the client following the parameter reference at https://learn.microsoft.com/openapi/kiota/using; the homepage is https://aka.ms/kiota/docs.

How it compares

The facts provided name no comparable generator in this registry, so Kiota stands alone here rather than alongside a listed alternative. The only adjacent technology named is Microsoft.OpenAPI.NET, which Kiota consumes as a library dependency rather than competes against.

When to use it — and when not to

A self-hoster runs the Kiota CLI and the required tools and dependencies for each target language, which the README documents per language in its supported languages table; no database, storage or mail service is involved. Do not pick it if the API in question has no OpenAPI description, or if Dart generation is needed today, since that target is still marked as work in progress. The repository carries 222 open issues and the README defers most usage detail to external documentation, so teams wanting a small, fully self-contained reference should read the linked docs before committing.

project readme (upstream, from github) — read inline

Project

Dotnet CodeQL

Kiota is a command line tool for generating an API client to call any OpenAPI described API you are interested in. The goal is to eliminate the need to take a dependency on a different API SDK for every API that you need to call. Kiota API clients provide a strongly typed experience with all the features you expect from a high quality API SDK, but without having to learn a new library for every HTTP API.

This library builds on top of the Microsoft.OpenAPI.NET library to ensure comprehensive support for APIs that use OpenAPI descriptions. One of the goals of the project is to provide the best code generator support possible for OpenAPI and JSON Schema features. The conceptual documentation describes how kiota works and the high level concepts, this readme documents how to get started with Kiota.

Getting started

Generating SDKs

  1. Install required tools and dependencies. (refer to the Supported Languages table under the Required tools & dependencies column)
  2. Get Kiota using one of the available options.
  3. Generate your API client, checkout the Parameters reference for the different options.
  4. Start calling your API using your fluent API Client.

Supported languages

The following table provides an overview of the languages supported by Kiota and the progress in the implementation of the different components.

Legend: ✔ -> stable, 🛠️ -> in preview, ❌ -> not started, ▶ -> in progress.

Parameters reference

Parameters are documented here.

Debugging

Make sure you install the pre-requisites first. If you are using Visual Studio Code as your IDE, the launch.json file already contains the configuration to run Kiota. By default this configuration will use the openApiDocs/v1.0/Mail.yml under the PowerShell repository as the OpenAPI to generate an SDK for. By default this configuration will output the generated files in a graphdotnetv4|graphjavav4|graphtypescriptv4 folder located in the parent folder this repository is cloned in.

Selecting the language you want to generate an API client for in the Visual Studio Debug tab and hitting F5 will automatically build, start, and attach the debugging process to Kiota.

Samples

You can find samples of clients generated with Kiota in the Kiota samples repository.

An example of an application that is calling multiple APIs can be found in the KiotaApp repo.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Frequently asked questions

Is kiota free to use?

kiota is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does kiota do?

OpenAPI based HTTP Client code generator

What is kiota written in?

kiota is primarily written in C#. Its source is publicly available at https://github.com/microsoft/kiota, and it has 3,844 GitHub stars.