To have your API managed by Cloud Endpoints, you have three options depending
on where your API is hosted and the type of communications protocol your
API uses:

- [Cloud Endpoints for OpenAPI](https://docs.cloud.google.com/endpoints/docs/openapi.md.txt)
- [Cloud Endpoints for gRPC](https://docs.cloud.google.com/endpoints/docs/grpc/about-grpc.md.txt)
- [Cloud Endpoints Frameworks for the App Engine standard environment](https://docs.cloud.google.com/endpoints/docs/frameworks/about-cloud-endpoints-frameworks.md.txt)

This page describes the Endpoints options to help you decide
which one is right for you.

## Choosing a computing option

Endpoints supports different Google Cloud
computing options that can host your API's backend code. Endpoints works with either the
[Extensible Service Proxy (ESP)](https://docs.cloud.google.com/endpoints/docs/grpc/glossary.md.txt#extensible_service_proxy) or the [Extensible Service Proxy V2](https://docs.cloud.google.com/endpoints/docs/openapi/glossary.md.txt#extensible_service_proxy_v2) (ESPv2) to provide API management. The following table
summarizes the supported computing options:

|   | **ESP for OpenAPI** | **ESP for gRPC** | **ESPv2 for OpenAPI** | **ESPv2 for gRPC** | **Endpoints Frameworks** |
|---|---|---|---|---|---|
| **App Engine standard environment generation 1** | No | No | Yes | No | Java 8 and Python 2.7 runtimes |
| **App Engine standard environment generation 2** | No | No | Yes | No | No |
| **App Engine flexible environment** | Yes | No | No | No | No |
| **Cloud Run functions** | No | No | Yes | No | No |
| **Cloud Run** | No | No | Yes | Yes | No |
| **Knative serving** | No | No | Yes | Yes | No |
| **Compute Engine** | Yes | Yes | Yes | Yes | No |
| **GKE** | Yes | Yes | Yes | Yes | No |
| **Kubernetes** | Yes | Yes | Yes | Yes | No |
| **Other non-Google Cloud** | Yes | Yes | Yes | Yes | No |

For a comparison of the features provided by App Engine,
GKE, and Compute Engine, see
[Choosing a computing option](https://docs.cloud.google.com/docs/choosing-a-compute-option).
If you are thinking of using App Engine, you need to choose either the
standard or flexible environment. For a comparison of the two environments, see
[Choosing an App Engine environment](https://docs.cloud.google.com/appengine/docs/the-appengine-environments.md.txt).

## About the computing option limitations

Endpoints for OpenAPI and Endpoints for gRPC can use
ESP or ESPv2 as a proxy.
For non-serverless platforms, ESP or ESPv2 is deployed as a container in front of your
application or as a sidecar with your application. For serverless platforms, such as Cloud Run, Cloud Run functions, and App Engine, ESPv2 is deployed as a Cloud Run service as a remote proxy to manage your serverless platform applications.

After you deploy your API's
backend code, ESP or ESPv2 intercepts all requests and performs any
necessary checks (such as authentication) before forwarding the request to the
API backend. When the backend responds, ESP gathers and reports
telemetry using [Service Infrastructure](https://docs.cloud.google.com/service-infrastructure/docs/overview.md.txt).

You can view metrics for your API and links to
[Google Cloud Observability](https://docs.cloud.google.com/stackdriver/docs.md.txt)
logs and traces on the **Endpoints Services** page in the
Google Cloud console.

### App Engine standard generation 1 environment limitations

Endpoints for the App Engine standard generation 1 environment historically used Endpoints Frameworks, which
only supports the [Java 8 and Python 2.7 runtime environments](https://docs.cloud.google.com/appengine/docs/standard/runtimes).


Because the App Engine standard environment didn't support
multi-container deployments when Endpoints Frameworks was
under development, Endpoints Frameworks doesn't use
ESP. Instead, Endpoints Frameworks includes a built-in
[API gateway](https://wikipedia.org/wiki/API_management)
that provides API management features that are comparable to the
features that ESP provides for Endpoints for OpenAPI and
Endpoints for gRPC.

<br />

> [!NOTE]
> **Note:** Although Endpoints Frameworks does work with the Java 7 runtime on App Engine standard environment, the [Java 7 runtime was deprecated](https://docs.cloud.google.com/appengine/docs/deprecations/java7) and is scheduled to be shutdown.

### gRPC APIs aren't supported on App Engine or Cloud Run functions

[gRPC](https://grpc.io/about/)
is a remote procedure call (RPC) framework that
can run on any environment. With gRPC, a client application can directly call
methods in a server application on a different machine as if it were a local
object. A core feature of gRPC is bi-directional streaming with
[HTTP/2-based transport](https://wikipedia.org/wiki/HTTP/2).

App Engine and Cloud Run functions don't support HTTP/2.

## Supported programming languages

- The [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) is a language-agnostic specification. You can implement your API in any programming language.
- gRPC provides the [protocol buffer compiler](https://developers.google.com/protocol-buffers/docs/overview), `protoc`, for many major programming languages: C++, C#, Objective-C (for iOS), Dart, Go, Java (including support for Android), Node.js, Python, and Ruby. See the [gRPC FAQ](https://grpc.io/faq/) for the most up-to-date list.
- Endpoints Frameworks supports only Java 8 and Python 2.7.

## Describing your API

The Endpoints options provide different ways to describe your API.

### Endpoints for OpenAPI

The
[OpenAPI Initiative](http://openapis.org/)
is an industry-wide effort to standardize the description of REST APIs.
Endpoints supports APIs that are described using OpenAPI 2.0 and OpenAPI 3.x of
the OpenAPI Specification (formerly the
[Swagger Specification](https://swagger.io/docs/specification/about/)). To learn more, see [Supported OpenAPI versions](https://docs.cloud.google.com/endpoints/docs/openapi/openapi-overview.md.txt#supported-openapi-versions).
You describe the
[surface](https://docs.cloud.google.com/endpoints/docs/openapi/glossary.md.txt#surface)
of your API in a JSON or YAML file (referred to as an OpenAPI document). You can
implement your API using any publicly available REST framework such as
[Django](https://www.djangoproject.com/)
or
[Jersey](https://jersey.github.io/).
If you are unfamiliar with the OpenAPI Specification, see
[OpenAPI overview](https://docs.cloud.google.com/endpoints/docs/openapi/openapi-overview.md.txt).

For more information, see [Endpoints for OpenAPI](https://docs.cloud.google.com/endpoints/docs/openapi.md.txt).

### Endpoints for gRPC

With gRPC, you define the structure of the data that you want to serialize in a
*proto file* : this is an ordinary text file with a `.proto` extension. You also
define the
[surface](https://docs.cloud.google.com/endpoints/docs/grpc/glossary.md.txt#surface)
of your API in proto files, with RPC method parameters and return types
specified as protocol buffer messages. If you are unfamiliar with gRPC, see
[What is gRPC?](https://grpc.io/docs/guides/)
in the gRPC documentation.

For more information, see [Endpoints for gRPC](https://docs.cloud.google.com/endpoints/docs/grpc/about-grpc.md.txt).

### Endpoints Frameworks

Endpoints Frameworks is a
[web framework](https://wikipedia.org/wiki/Web_framework)
for the App Engine standard Python 2.7 and Java 8 runtime environments.
You add metadata (using annotations in Java or decorators in Python) to your
source code. The metadata describes the
[surface](https://docs.cloud.google.com/endpoints/docs/frameworks/glossary.md.txt#surface)
of the REST APIs for your application.

For more information, see [Endpoints Frameworks](https://docs.cloud.google.com/endpoints/docs/frameworks/about-cloud-endpoints-frameworks.md.txt).

## What's next

- See Endpoints features in action by doing the
  [Quickstart for Endpoints](https://docs.cloud.google.com/endpoints/docs/deploy-api.md.txt),
  which uses scripts to deploy a sample API to the App Engine flexible
  environment.

- Get familiar with the deployments steps by doing one of the tutorials for
  the Endpoints option that you have chosen:

  - [Endpoints for OpenAPI: Tutorials](https://docs.cloud.google.com/endpoints/docs/openapi/tutorials.md.txt)
  - [Endpoints for gRPC: Tutorials](https://docs.cloud.google.com/endpoints/docs/grpc/tutorials.md.txt)
  - [Endpoints Frameworks: Tutorials](https://docs.cloud.google.com/endpoints/docs/frameworks/tutorials.md.txt)
- Learn more about Endpoints and ESP:

  - [Endpoints for OpenAPI: About Endpoints](https://docs.cloud.google.com/endpoints/docs/openapi/about-cloud-endpoints.md.txt)
  - [Endpoints for gRPC: About Endpoints](https://docs.cloud.google.com/endpoints/docs/grpc/about-cloud-endpoints.md.txt)
  - [Comparing Extensible Service Proxy and Endpoints Frameworks](https://docs.cloud.google.com/endpoints/docs/frameworks/frameworks-extensible-service-proxy.md.txt)