---
title: "Execute a preset"
method: POST
path: "/api/library/presets/{preset_id}/execute"
tags: ["v2", "presets", "presets"]
---

# Execute a preset

`POST /api/library/presets/{preset_id}/execute`

Execute a preset with the given graph and node input for the current user.

## Path parameters

- `preset_id` string, required

## Request body

- BodyPostV2ExecuteAPreset
  - `inputs` object
  - `credential_inputs` object

## Response `200`

Successful Response

- GraphExecutionMeta
  - `id` string, required
  - `user_id` string, required
  - `graph_id` string, required
  - `graph_version` integer, required
  - `inputs` object, nullable, required
  - `credential_inputs` object, nullable, required
  - `nodes_input_masks` object, nullable, required
  - `preset_id` string, nullable, required
  - `status` 'INCOMPLETE' | 'QUEUED' | 'RUNNING' | 'COMPLETED' | 'TERMINATED' | 'FAILED' | 'REVIEW', required
  - `started_at` string, date-time, nullable — When execution started running. Null if not yet started (QUEUED).
  - `ended_at` string, date-time, nullable — When execution finished. Null if not yet completed (QUEUED, RUNNING, INCOMPLETE, REVIEW).
  - `is_shared` boolean
  - `share_token` string, nullable
  - `is_dry_run` boolean
  - `organization_id` string, nullable
  - `team_id` string, nullable
  - `stats` Stats, required
    - `cost` integer — Execution cost (cents)
    - `duration` number — Seconds from start to end of run
    - `duration_cpu_only` number — CPU sec of duration
    - `node_exec_time` number — Seconds of total node runtime
    - `node_exec_time_cpu_only` number — CPU sec of node_exec_time
    - `node_exec_count` integer — Number of node executions
    - `node_error_count` integer — Number of node errors
    - `error` string, nullable — Error message if any
    - `activity_status` string, nullable — AI-generated summary of what the agent did
    - `correctness_score` number, nullable — AI-generated score (0.0-1.0) indicating how well the execution achieved its intended purpose

## Other responses

- `401` — Authentication required
- `402` — Subscription required (NO_TIER user, paywall on)
- `422` — Validation Error
- `503` — Subscription state temporarily unavailable

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/versions/382041c7ecb2/schema)
