# gRPC Transcode Configuration

The `grpc-transcode` plugin translates HTTP requests into gRPC calls and converts protobuf responses and structured gRPC errors into JSON.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* proto\_id

  string or integer

  required

  ***

  ID of the [proto](https://docs.api7.ai/apisix/key-concepts/protos.md) resource that contains the protocol buffer definitions.

* service

  string

  required

  ***

  Name of the gRPC service.

* method

  string

  required

  ***

  Method name of the gRPC service.

* deadline

  number

  default: `0`

  ***

  Time in milliseconds the gateway waits for the gRPC call to complete. Set to `0` to omit the deadline.

* pb\_option

  array\[string]

  default: `["enum_as_name", "int64_as_number", "auto_default_values", "disable_hooks"]`

  ***

  Encoder and decoder [options](https://github.com/starwing/lua-protobuf?tab=readme-ov-file#options). The option can be configured as an array of one or more of the below values:

  For enum as result: `enum_as_name`, `enum_as_value`

  For int64 as result: `int64_as_number`, `int64_as_string`, `int64_as_hexstring`

  For default values: `auto_default_values`, `no_default_values`, `use_default_values`, `use_default_metatable`

  For hooks: `enable_hooks`, `disable_hooks`

* show\_status\_in\_body

  boolean

  default: `false`

  ***

  If true, display the parsed `grpc-status-details-bin` in the response body.

* status\_detail\_type

  string

  ***

  Protobuf message type used to decode each [details](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto#L46) entry in `grpc-status-details-bin`. When omitted, the details remain generic `Any` values.

* max\_resp\_body\_size

  integer

  default: `67108864`

  valid value:

  greater than or equal to 1

  ***

  Maximum response body size in bytes buffered for transcoding. A larger response is truncated to this size before transcoding. The chunk that crosses the threshold is buffered before the limit is enforced, so transient memory use can exceed the configured size. Introduced in API7 Enterprise 3.9.17 and 3.10.4, and APISIX 3.18.0.
