---
title: "Generate Python httpx client from Protobuf definition"
method: POST
path: "/api/protobuf/python-httpx"
tags: ["Protobuf"]
---

# Generate Python httpx client from Protobuf definition

`POST /api/protobuf/python-httpx`

## Request body

- ProtobufPythonHttpxRequest
  - `protoSource` string, nullable, required — Inline Protocol Buffers (.proto) definition content.
  - `documentation` boolean, nullable
  - `optionsObjectThreshold` integer, nullable
  - `errorHandling` ErrorHandlingOptions
    - `enabled` boolean, nullable
    - `returnNullForStatusCodes` integer[], nullable
    - `throwForStatusCodes` integer[], nullable
  - `timeout` TimeoutOptions
    - `seconds` number, double, nullable
    - `connect` number, double, nullable
    - `read` number, double, nullable
    - `write` number, double, nullable
  - `bearerAuth` BearerAuthOptions
    - `envVarName` string, nullable
    - `headerName` string, nullable
  - `basicAuth` BasicAuthOptions
    - `usernameEnvVar` string, nullable
    - `passwordEnvVar` string, nullable
  - `retries` RetryOptions
    - `maxAttempts` integer, nullable
    - `baseDelaySeconds` number, double, nullable
    - `maxDelaySeconds` number, double, nullable
    - `retryStatusCodes` integer[], nullable
  - `customHeaders` CustomHeaderOption[], nullable
    - `headerName` string, nullable
    - `envVarName` string, nullable
  - `baseUrlEnvVar` string, nullable
  - `generateSyncMethods` boolean, nullable
  - `useCamelCaseAliases` boolean, nullable

## Response `200`

OK

- CodeGenerationResult
  - `executionTimeInMilliseconds` integer
  - `files` CodeFileResult[], nullable
    - `name` string, nullable
    - `path` string, nullable
    - `content` string, nullable
  - `warnings` string[], nullable
  - `additionalInfo` AdditionalInfo
    - `message` string, nullable, required
    - `level` string, nullable — Severity level: info, warning, or critical
    - `actionUrl` string, nullable — Optional URL for the client to act on (e.g., migration guide, changelog)

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.dev/metaengine/apis/metaengine-api.md) · [All operations](https://skmtc.dev/metaengine/apis/metaengine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/metaengine/metaengine-api/revisions/7bba577610ce/schema)
