Quickstart (cURL)
This guide will walk you through a complete, end-to-end example of using the WithGiga API to instantly provision a cloud computer and instruct an AI agent to complete a task.Prerequisites
Before starting, make sure you have:- An active WithGiga API Key (starts with
giga_sk_...) curlinstalled on your terminal
Step 1: Start a Deployment and AI Run
We will use the/api/deployments/start endpoint. This is a powerful, unified endpoint that:
- Provisions a new virtual computer (sandbox).
- Initializes an AI session.
- Automatically triggers the AI agent to begin executing your instructions.
"aiEnabled": true and provide a prompts object with a userPrompt (what to do) and a goalPrompt (what constitutes success).
deployment.id from this response, as you will use it to check the status of your computer.
Step 2: Poll Deployment Status
The computer provisioning and agent execution happen asynchronously in the background. You can poll the Deployment endpoint to check the overall status of the machine.running.
status will change to COMPLETED and isCompleted will be true.