---
title: "v2_post_runs | Python SDK | AEO API"
description: "Estimate or start a workflow. The collection estimate example asks for a credit estimate before you submit a paid run."
url: "https://aeoapi.dev/docs/sdks/python/v2-post-runs"
canonical: "https://aeoapi.dev/docs/sdks/python/v2-post-runs"
last_updated: "2026-11-30"
---

# v2_post_runs

Estimate or start a workflow. The collection estimate example asks for a credit estimate before you submit a paid run.

See the REST reference for [`POST /v2/runs`](https://aeoapi.dev/docs/api-reference#post-v2-runs).

## Signature

```
v2_post_runs(
    body: Mapping[str, Any],
    *,
    idempotency_key: str | None = None,
) -> Response[Any]
```

## Parameters

**`body`**

Dictionary for the selected operation. See the REST reference for its required fields.

**`idempotency_key`**

Value for Idempotency-Key. For requests that require this header, the SDK generates a UUID if you omit it. Send the original value if your application repeats the same write.

## Return value

For this estimate, read estimated_credits and maximum_credits in response.data. A run start can instead return HTTP 202 with a poll URL.

## Errors

- AeoApiError includes the HTTP status, error code and request ID. An invalid key raises UnauthenticatedError. Check the key’s scopes if you receive ForbiddenError.
- Invalid arguments can raise ValueError or TypeError before the SDK sends a request.
- AeoTransportError means the request could not reach the API after any allowed retries, or the response could not be read as JSON.
- PreconditionFailedError means the revision has changed. Read the current record before editing it again.
- For a conflict, read the error message before repeating the write. Check the saved record for a competing edit or a repeated request.

## Python example

```
import os
from aeo_sdk import AeoClient

with AeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
    response = client.v2_post_runs(
        body={
            'answer_mode': 'standard',
            'brand_id': '00000000-0000-4000-8000-000000000001',
            'estimate': True,
            'market': {'country': 'US', 'language': 'en'},
            'max_units': 0,
            'prompt_ids': ['00000000-0000-4000-8000-000000000001'],
            'sources': [{'mode': 'ui_normal', 'platform': 'chatgpt'}],
            'workflow': 'collect',
        },
    )
    print(response.body)
```

## Async example

```
import asyncio
import os
from aeo_sdk import AsyncAeoClient

async def main():
    async with AsyncAeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
        response = await client.v2_post_runs(
            body={
                'answer_mode': 'standard',
                'brand_id': '00000000-0000-4000-8000-000000000001',
                'estimate': True,
                'market': {'country': 'US', 'language': 'en'},
                'max_units': 0,
                'prompt_ids': ['00000000-0000-4000-8000-000000000001'],
                'sources': [{'mode': 'ui_normal', 'platform': 'chatgpt'}],
                'workflow': 'collect',
            },
        )
        print(response.body)

asyncio.run(main())
```

## Requests by feature

### Prompts and topics

- [Estimate web suggestions](https://aeoapi.dev/docs/features/prompts-and-topics/post-runs-estimate-prompt-suggestions)

### AI answer collection and runs

- [Collect answers](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-collect)
- [Estimate collection credits](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-estimate-collect)
- [Estimate a managed check](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-estimate-managed)
- [Start a managed check](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-managed)
- [Estimate a batch of checks](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-estimate-managed-batch)
- [Start a batch of checks](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-managed-batch)

### Site audits and page checks

- [Estimate an audit](https://aeoapi.dev/docs/features/site-audits-and-page-checks/post-runs-estimate-audit)
- [Audit a site](https://aeoapi.dev/docs/features/site-audits-and-page-checks/post-runs-audit)
- [Refresh page measurements](https://aeoapi.dev/docs/features/site-audits-and-page-checks/post-runs-page-refresh)

### Citations

- [Check selected cited pages](https://aeoapi.dev/docs/features/citations/post-runs-citation-check)
- [Estimate a cited page sweep](https://aeoapi.dev/docs/features/citations/post-runs-estimate-cited-page-sweep)
- [Check pages due for review](https://aeoapi.dev/docs/features/citations/post-runs-cited-page-sweep)
- [Estimate cited page labels](https://aeoapi.dev/docs/features/citations/post-runs-estimate-cited-page-labelling)
- [Label cited pages](https://aeoapi.dev/docs/features/citations/post-runs-cited-page-labelling)

### Answer accuracy

- [Estimate an answer check](https://aeoapi.dev/docs/features/answer-accuracy/post-runs-estimate-check-answer-accuracy)
- [Check answer accuracy](https://aeoapi.dev/docs/features/answer-accuracy/post-runs-check-answer-accuracy)
- [Estimate a draft check](https://aeoapi.dev/docs/features/answer-accuracy/post-runs-estimate-check-draft-accuracy)
- [Check draft accuracy](https://aeoapi.dev/docs/features/answer-accuracy/post-runs-check-draft-accuracy)
- [Estimate claim verification](https://aeoapi.dev/docs/features/answer-accuracy/post-runs-estimate-verify-answer-claims)
- [Verify claims in one answer](https://aeoapi.dev/docs/features/answer-accuracy/post-runs-verify-answer-claims)

### Retrieval simulator and content testing

- [Estimate a pre-publish review](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-estimate-prepublish-review)
- [Review a draft before publication](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-prepublish-review)
- [Estimate a retrieval benchmark](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-estimate-retrieval-benchmark)
- [Benchmark a draft](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-retrieval-benchmark)
- [Estimate a regression test](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-estimate-retrieval-regression)
- [Compare staging and production](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-retrieval-regression)
- [Estimate paragraph win rates](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-estimate-retrieval-win-rate)
- [Simulate paragraph win rates](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-retrieval-win-rate)
- [Estimate passage overlap](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-estimate-passage-overlap)
- [Compare passages with answers](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-passage-overlap)
- [Estimate question coverage](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-estimate-query-fanout-coverage)
- [Check buyer question coverage](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-query-fanout-coverage)
- [Test passage position](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-context-position-test)
- [Compare personas and markets](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-persona-geo-divergence)
- [Find gaps in comparison evidence](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-comparison-evidence-gaps)
- [Check asset readability](https://aeoapi.dev/docs/features/retrieval-simulator-and-content-testing/post-runs-asset-readability)

### Recommendations and visibility analyst

- [Explain a visibility change](https://aeoapi.dev/docs/features/recommendations-and-visibility-analyst/post-runs-explain-visibility-change)

### Content drafts and editorial generation

- [Estimate draft generation](https://aeoapi.dev/docs/features/content-drafts-and-editorial-generation/post-runs-estimate-editorial-generation)
- [Generate draft content](https://aeoapi.dev/docs/features/content-drafts-and-editorial-generation/post-runs-editorial-generation)

### AI search topics

- [Estimate topic research](https://aeoapi.dev/docs/features/ai-search-topics/post-runs-estimate-ai-search-topics)
- [Find AI search topics](https://aeoapi.dev/docs/features/ai-search-topics/post-runs-ai-search-topics)

### Submit to Brave

- [Submit a page](https://aeoapi.dev/docs/features/submit-to-brave/post-runs-brave-submit)

See [Python client setup](https://aeoapi.dev/docs/sdks/python) for the environment variables, response properties and retry settings.
