Skip to content

    v2_get_runs

    List managed runs for a brand. Use the saved_checks view for recent prompt checks and their results.

    See the REST reference for GET /v2/runs.

    Signature

    v2_get_runs(
        *,
        brand_id: str,
        cursor: str | None = None,
        limit: int | None = None,
        offset: int | None = None,
        view: Literal['managed', 'saved_checks'] | None = None,
    ) -> Response[Any]

    Parameters

    brand_id
    Identifier for the brand.
    cursor
    Pass the previous page's next cursor with the original filters.
    limit
    Maximum number of records per page. Each view sets its own limit.
    offset
    Number of records to skip. For draft lists, send the returned next_offset.
    view
    Choose the result to read. See the linked REST reference for the fields and access each view requires.

    Return value

    The managed view returns runs in response.data. Each run includes its brand ID and charged credits.

    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.

    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_get_runs(
            brand_id='00000000-0000-4000-8000-000000000001',
        )
        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_get_runs(
                brand_id='00000000-0000-4000-8000-000000000001',
            )
            print(response.body)
    
    asyncio.run(main())

    Requests by feature

    AI answer collection and runs

    See Python client setup for the environment variables, response properties and retry settings.