Skip to content

    AI answer collection and runs

    Read a managed run

    Check progress by source and credits used. When the report is ready, the result includes its link.

    GET /v2/runs/{run_id}

    • Path run_id starts with managed:.

    Authentication and access

    Authentication
    Bearer API key
    Scopes
    collections:read
    Roles
    approver, editor, owner, publisher, service, viewer
    Plans
    Optimizer, Analyzer
    Credits
    No credit charge.

    Parameters

    Request parameters
    NameWhereTypeRequiredDescription
    run_idpathstring | string (uuid)Yes

    Request body

    Send this request without a body.

    Request examples

    Set AEO_API_BASE_URL to https://api.aeoapi.dev and AEO_API_KEY to your server-side API key. Set the other environment variables to the values for your request.

    curl --fail-with-body -X GET "$AEO_API_BASE_URL/v2/runs/$RUN_ID" \
      -H "Authorization: Bearer $AEO_API_KEY"
    from os import environ
    from aeo_sdk import AeoClient
    
    with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
        response = client.v2_get_runs_run_id(
            run_id=environ["RUN_ID"],
        )
        print(response.body)
    import { AeoClient } from "@aeoapi/aeo-sdk";
    
    const client = new AeoClient(process.env.AEO_API_KEY!, {
      baseUrl: process.env.AEO_API_BASE_URL!,
    });
    const response = await client.v2GetRunsRunId(
      process.env.RUN_ID!,
    );
    console.log(response.body);

    Responses

    Read data.status. Stop polling at completed, partial, failed or cancelled. A completed or partial run can have results. If the run failed, check the reported reason.

    HTTP 200

    Successful Response

    application/json

    Response fields are listed below.

    HTTP 200 response fields 1
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.brand_idstringYesIdentifies the brand this result belongs to.
    data.charged_creditsintegerYes
    data.check_idstring | nullYes
    data.check_urlstring | nullYes
    data.citation_status"in_progress" | "completed"NoCitation preparation status for this run, when applicable.
    data.created_atstringYes
    data.estimated_creditsintegerYesThe expected credit cost for this selection.
    data.failure_reasonsarray of "access_restricted" | "limit_reached" | "input_missing" | "approval_expired" | "cancelled" | "check_failed" | "check_incomplete"Yes
    data.hold_reasonsarray of "retry_pending" | "under_review"Yes
    data.idstringNo
    data.phasestring | nullYes
    data.progressobjectYes
    data.progress.by_locationarray of objectNo
    data.progress.by_location[].by_sourcearray of objectConditional
    data.progress.by_location[].completed_stepsintegerConditional
    data.progress.by_location[].expected_stepsintegerConditional
    data.progress.by_location[].location_idstring (uuid)Conditional
    data.progress.by_sourcearray of objectYes
    data.progress.completed_stepsintegerYes
    data.progress.expected_stepsintegerYes
    data.prompt_set_revisionstringYes
    data.released_creditsintegerYes
    data.reportobjectNo
    data.report.report_idstringConditional
    data.report.report_urlstringConditional
    data.report_idstring | nullYes
    data.report_status"pending" | "ready" | "not_available"Yes
    data.report_urlstring | nullYes
    data.reserved_creditsintegerYes
    data.resultobjectNo
    data.result.by_locationarray of objectNo
    data.result.by_location[].by_sourcearray of objectConditional
    data.result.by_location[].completed_stepsintegerConditional
    data.result.by_location[].expected_stepsintegerConditional
    data.result.by_location[].location_idstring (uuid)Conditional
    data.result.by_sourcearray of objectConditional
    data.result.completed_stepsintegerConditional
    data.result.expected_stepsintegerConditional
    data.run_idstringYesIdentifies the run. Keep any prefix when using it in a request.
    data.statusstringYes
    data.updated_atstringYes
    data.v2_run_idstringNoThe prefixed run ID accepted by GET /v2/runs/{run_id}.
    data.websitestring | nullYes
    metaobjectYesInformation about this response, including any warnings or pagination details.

    Errors

    Read code and message in the error response. Keep request_id when you contact support.

    AI answer collection and runs reference