HTTP Direct API
Kody’s API is available through a high-performance HTTP interface powered by gRPC and Protobuf, allowing for direct integration without using client libraries.
Advantages of gRPC over REST
- Strongly typed definitions ensure precise, versioned API contracts.
- High performance with binary serialization and HTTP/2.
- Streaming support for advanced use cases.
- Automatic retry logic for fault tolerance.
- Smaller payloads compared to JSON-based APIs.
Generate Client Libraries
Generate the client libraries locally
The client libraries provided by Kody are generated code from the proto
files that are exposed in this API. You can find the proto
files in the GitHub Kody protocols repository and you can generate the client code yourself with protoc
.
- Python
- Java
pip install grpcio grpcio-tools
python -m grpc_tools.protoc -I. \
--python_out=. \
--grpc_python_out=. \
path_to_proto_file.proto
brew install protobuf
protoc --java_out=src/main/java \
--grpc-java_out=src/main/java \
path_to_proto_file.proto
Use Cases for HTTP Direct API
- Custom integrations without SDKs.
- Language or framework not supported by existing SDKs.
- Performance-critical applications requiring low-latency communication.