All Products
Search
Document Center

Platform For AI:EAS client SDK

Last Updated:Jun 16, 2026

The official EAS SDKs, available in Java, Python, and Golang, are the recommended method for invoking services in direct VPC connection scenarios. The SDKs handle service discovery and load balancing so you do not have to implement them yourself.

Use cases

The most common use case for the official EAS SDK is direct VPC connection. In this scenario, the SDK handles service discovery and load balancing for you.

For other invocation methods, such as through a shared or dedicated gateway, a standard HTTP client is typically sufficient, and the SDK is not required.

For guidance on selecting an invocation method, see Service invocation.

How it works

The SDK supports two endpoint types: gateway access and direct VPC connection. Regardless of the endpoint type, the invocation process follows three stages:

  1. Initialize the client: Create a PredictClient, set the endpoint, service name, and token (which can be obtained from the service details page in the EAS console), and then call init().

  2. Construct a request: Construct a request object, such as StringRequest, TFRequest, or TorchRequest, based on the service's input and output formats. The request type must match the one the service expects. For services deployed with a processor, see Processor deployment for the request type corresponding to each processor.

  3. Invoke the service: Call the predict() method to send the request and receive the response. The SDK automatically handles token signing, retry on failure (five times by default), and response deserialization.

Note

In a direct VPC connection scenario, the official SDK handles service discovery and load balancing. For details, see Direct VPC connection - Call with the official SDK.

In addition to synchronous inference, the SDK provides a queue service invocation method:

  1. Use a QueueClient to asynchronously push requests to an input queue. The service then consumes the requests and writes the results to an output queue.

  2. The client receives the results by subscribing to (watching) the output queue.

This method is suited for asynchronous inference and long-running tasks. For detailed instructions, see the examples in each language-specific SDK guide.

SDK reference

Select your programming language to find installation instructions, API references, and code samples:

Invocation troubleshooting

If an SDK call fails, troubleshoot layer by layer in this order: client → network → server-side.

  • Authentication (401 / 403): Check if the token is passed correctly, matches the target service, or has been reset in the console.

  • Routing (404): Verify that the endpoint and service name match the values on the service details page in the EAS console. For direct VPC connections, confirm that service discovery has fetched the instance list.

  • Connectivity (connection refused / timeout / DNS resolution failed): Verify that the client and server are in the same VPC, that security group rules allow the traffic, and that the endpoint domain is resolvable.

  • Server-side (5xx / empty response / invalid response format): Check the service logs to find the root cause of these issues.

For a complete list of service status codes, typical error messages, and recommended solutions, see Appendix: Service status codes and common errors.