Get started with setting up your Runpod projects using Go. Whether you’re building web applications, server-side implementations, or automating tasks, the Runpod Go SDK provides the tools you need. This guide outlines the steps to get your development environment ready and integrate Runpod into your Go projects.Documentation Index
Fetch the complete documentation index at: https://runpod-b18f5ded-promptless-github-integration-timeout-clari.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure that you have the following:- Go installed on your machine (version 1.16 or later)
- A Runpod account with an API key and Endpoint Id
Install the Runpod SDK
Before integrating Runpod into your project, you’ll need to install the SDK. To install the Runpod SDK, run the followinggo get command in your project directory.
runpod-sdk package. Then run the following command to install the dependencies:
Add your API key
To use the Runpod SDK in your project, you first need to import it and configure it with your API key and endpoint ID. Ensure these values are securely stored, preferably as environment variables. Below is a basic example of how to initialize and use the Runpod SDK in your Go project.Secure your API key
When working with the Runpod SDK, it’s essential to secure your API key. Storing the API key in environment variables is recommended, as shown in the initialization example. This method keeps your key out of your source code and reduces the risk of accidental exposure.Use environment variables or secure secrets management solutions to handle sensitive information like API keys.