Quickstart
Authenticate, discover a workspace, and complete your first stateful Omni task.
Get from a new API key to a completed stateful task in a few minutes. Vault upload is a separate next step, so encryption does not block your first success.
Create a Developer Preview key
Open API Keys, choose Developer Preview, name the key, and copy its secret. The plaintext secret is shown once.
export OMNI_API_ORIGIN="https://gateway.omnistatic.com"
export OMNI_API_KEY="omni_sk_live_..."Verify your identity
/v1/me Previewcurl -sS "$OMNI_API_ORIGIN/v1/me" \
-H "Authorization: Bearer $OMNI_API_KEY"The response contains your public data.user_id. A 401 unauthorized means the key is missing, invalid, or revoked.
Discover a workspace
/v1/workspaces Previewcurl -sS "$OMNI_API_ORIGIN/v1/workspaces" \
-H "Authorization: Bearer $OMNI_API_KEY"Choose an id from data.workspaces and export it:
export OMNI_WORKSPACE_ID="your_workspace_id"Create a stateful task
/v1/tasks Previewexport OMNI_IDEMPOTENCY_KEY="quickstart-$(uuidgen)"
curl -sS -X POST "$OMNI_API_ORIGIN/v1/tasks" \
-H "Authorization: Bearer $OMNI_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $OMNI_IDEMPOTENCY_KEY" \
-d '{
"workspace_id": "'$OMNI_WORKSPACE_ID'",
"message": "Summarize what we have been working on."
}'Save the returned data.task_id. The server resolves the workspace's ongoing conversation; do not send a thread or conversation identifier.
Poll to completion
/v1/tasks/{task_id} Previewexport OMNI_TASK_ID="task_..."
curl -sS "$OMNI_API_ORIGIN/v1/tasks/$OMNI_TASK_ID" \
-H "Authorization: Bearer $OMNI_API_KEY"Poll with a short delay while status is queued or running. Stop at completed or failed. On completion, read data.output.text and data.output.citations.
Next steps
- Stream the response instead of polling.
- Give your agent knowledge through encrypted Vault upload.
- Read persistent history after the task finishes.