Skip to main content
To make gRPC API calls to Nebius AI Cloud services in your code, you can generate API clients from the Protocol Buffer specifications hosted on GitHub. The proto files come with a configuration file for Buf. To generate an API client by using the Buf CLI:
  1. Install the Buf CLI for macOS or Linux, for example, by using Homebrew:
    brew install bufbuild/buf/buf
    
  2. Clone the Nebius AI Cloud API repository and go to the Nebius AI Cloud Buf configuration:
    git clone https://github.com/nebius/api.git
    cd api
    cat buf.gen.yaml
    
  3. Edit the configuration to keep only the programming languages you support. For example, for Java only:
    version: v2
    plugins:
      - remote: buf.build/protocolbuffers/java
        out: gen/java
      - remote: buf.build/grpc/java
        out: gen/java
    
  4. To generate the client code, run the following command:
    buf generate
    
  5. To get the generated client code, go to the gen/<language> directory. For example, if you generated a Java client, go to gen/java.