> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trychainshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit a run

> Runs the organization's prompts on the specified models. This is a one-time run at the time of the request, not periodic monitoring. When the request succeeds, a prompt run (Run) is created. The run target must be either promptIDs (individual prompts) or promptSetID (an entire prompt set); you cannot use both at the same time. Check progress with the id in the response via Get prompt run status.

### Errors

| HTTP | Code | Description |
| --- | --- | --- |
| 400 | `COMMON_BINDING` | • Failed to parse the request body JSON • Invalid promptIDs or promptSetID format (`PLATFORM_INVALID_ID` in details) |
| 400 | `COMMON_VALIDATION` | • models missing, more than 8, or a value outside the allowed list • promptIDs more than 500 • repeatCount out of range (1 to 100) |
| 400 | `RUN_PROMPT_TARGET_REQUIRED` | Exactly one of promptIDs or promptSetID was not specified |
| 400 | `PROMPT_SET_EMPTY` | The specified set has no prompts to run |
| 400 | `MODEL_NOT_SUPPORTED` | model value not supported by the Platform API |
| 400 | `MODEL_DISCONTINUED` | A discontinued model was requested (no models are currently discontinued). Discontinued models do not appear in `GET /models` either |
| 400 | `NO_AVAILABLE_PLATFORM` | All requested models are currently unavailable for collection |
| 400 | `REGION_NOT_SUPPORTED` | Unsupported region code |
| 400 | `REGION_NOT_SUPPORTED_FOR_MODEL` | Region not supported by the model |
| 400 | `LOCATION_NOT_SUPPORTED` | Unsupported location code (a value not in `GET /locations`) |
| 400 | `LOCATION_REGION_MISMATCH` | Location does not belong to the specified region |
| 400 | `LOCATION_NOT_SUPPORTED_FOR_MODEL` | One or more of the requested models does not support this location |
| 400 | `QUESTION_NOT_MARKETING_PLATFORM` | Prompt does not belong to the Platform API |
| 400 | `RUN_TOO_MANY_TASKS` | Total number of runs (prompts × models × repeats) exceeds 10,000 |
| 401 | `COMMON_UNAUTHORIZED` | API key or access token is missing or invalid |
| 402 | `INSUFFICIENT_CREDITS` | Organization credit balance is lower than the unit price of this request |
| 403 | `MODEL_NOT_GRANTED` | A model that requires a separate agreement (`CLAUDE`, `PERPLEXITY`, `GROK`, `DEEPSEEK`) was requested without the grant (it does not appear in `GET /models` either) |
| 404 | `PROMPT_NOT_FOUND` | Prompt does not exist or belongs to another organization |
| 404 | `PROMPT_SET_NOT_FOUND` | Set does not exist or belongs to another organization |
| 404 | `CAMPAIGN_NOT_FOUND` | The campaign the prompt belongs to was not found |
| 429 | `PLATFORM_RATE_LIMIT_EXCEEDED` | Rate limit exceeded. Wait the number of seconds in the `Retry-After` header, then retry |
| 500 | — | Internal server error. Returns `message` and `requestID` without `code` |

See the [Running prompts](https://docs.trychainshift.ai/en/guides/submitting-runs.md) guide for the full flow (prepare prompts → submit → poll → retrieve answers) and polling loop code.

## FAQ

**Where do I get the results after submitting?**
Poll [Get run status](https://docs.trychainshift.ai/en/api-reference/runs/get-run-status.md) with the returned `runID`, and once it is `FINISHED`, query [List answers](https://docs.trychainshift.ai/en/api-reference/answers/list-answers.md) with the `runID` filter.


## OpenAPI

````yaml openapi.en.json POST /v1/platform/runs
openapi: 3.1.0
info:
  description: >-
    Platform API for external partners. Uses organization API key based
    authentication.

    ### Common request limits

    - The request body size is limited to 2MiB. Exceeding it returns 413 with
    the `COMMON_REQUEST_BODY_TOO_LARGE` code.

    - Array parameters and string fields have per-endpoint count and length
    limits. The limits are stated in each field or parameter description, and
    violating them returns 400 with the `COMMON_VALIDATION` code.

    ### Error responses

    The error response body always has the same three fields regardless of the
    status code.

    | Field | Type | Meaning |

    | --- | --- | --- |

    | `code` | string | A fixed identifier for the error type. This is the only
    value clients should branch on. The codes each endpoint returns are listed
    in the "Errors" table of that API. |

    | `message` | string | A human-readable, one-line summary of the whole
    error. There is always exactly one. |

    | `details` | array of strings | Individual reasons that do not fit in the
    single `message` line. Even a single reason is returned as an array of
    length 1, and the field is omitted when there is nothing to include. |

    - `details` is an array in every error. It is never returned as a string or
    an object, so no type-based branching is needed.

    - The wording of `details` is not a fixed contract. Use it only for display
    and debugging, and do not parse the strings to branch. Branch on `code`
    instead.

    - `details` is the only field that carries multiple reasons. There is no
    `messages` field in the response.

    - On validation failure (`COMMON_VALIDATION`), `details` contains one
    `"field: reason"` line per violated field. Example:
    `{"code":"COMMON_VALIDATION","message":"Data validation
    failed","details":["keywords: up to 100 items can be entered"]}`

    - `message` defaults to Korean and is returned in English when you send
    `Accept-Language: en`. `details` follows the same rule when it carries
    per-field reasons such as validation failures, but errors that include raw
    text for diagnostic purposes may contain wording in a language other than
    the requested one.

    - Only 500 has a different shape. It returns `message` and a `requestID` to
    reference when contacting support, without `code`.
  title: Platform API
  version: '1.0'
servers:
  - url: https://platform-api.trychainshift.ai/api
security: []
tags:
  - description: >-
      The top-level account unit that API keys belong to. Retrieve the
      organization's basic information.
    name: Organization
  - description: >-
      A target brand whose exposure in AI services is monitored. Provides brand
      registration, retrieval, update, and deletion.
    name: Brand
  - description: >-
      Keyword intelligence for analyzing brands and markets. Provides Google and
      Naver search metrics, related and autocomplete keyword lookups, and site
      URL based keyword analysis.
    name: Keyword (Beta)
  - description: >-
      A group that organizes prompts by purpose. Provides create, get, update,
      and delete operations for prompt sets.
    name: PromptSet
  - description: >-
      A sentence-level unit of a query sent to an AI service. Provides prompt
      create, get, update, and delete, plus bulk creation.
    name: Prompt
  - description: AI service models used for prompt runs. Lists the supported models.
    name: Model
  - description: The region used to run prompts. Retrieves the list of supported regions.
    name: Region
  - description: >-
      The unit of work that actually runs prompts against AI services. Provides
      prompt run requests and retrieval of progress status and lists.
    name: Run
  - description: >-
      An AI service response collected by a run. Retrieves answers including
      sources and search queries.
    name: Answer
  - description: >-
      Statistics on the sources cited in answers, at the domain and URL level.
      Retrieve the citation summary and per-domain and per-URL citation
      statistics.
    name: SourceStatistics (Beta)
  - description: >-
      Statistics on tokens (Kiwi nouns) in answer bodies. Retrieves a ranking of
      the most frequent tokens and the tokens near a specific word.
    name: AnswerStatistics (Beta)
  - description: >-
      Statistics on the search queries (fan-outs) the AI actually issued while
      generating answers. Retrieves a ranking of search queries by occurrence
      count.
    name: FanoutStatistics (Beta)
  - description: >-
      An auxiliary feature that identifies proper nouns in text. Provides proper
      noun extraction.
    name: ProperNoun (Beta)
  - description: >-
      Organization credit balance and Platform API billing information.
      Retrieves the current credit balance.
    name: Credit
externalDocs:
  description: ''
  url: ''
paths:
  /v1/platform/runs:
    post:
      tags:
        - Run
      summary: Prompt run request
      description: >-
        Runs the organization's prompts on the specified models. This is a
        one-time run at the time of the request, not periodic monitoring. When
        the request succeeds, a prompt run (Run) is created. The run target must
        be either promptIDs (individual prompts) or promptSetID (an entire
        prompt set); you cannot use both at the same time. Check progress with
        the id in the response via Get prompt run status.


        ### Errors


        | HTTP | Code | Description |

        | --- | --- | --- |

        | 400 | `COMMON_BINDING` | • Failed to parse the request body JSON •
        Invalid promptIDs or promptSetID format (`PLATFORM_INVALID_ID` in
        details) |

        | 400 | `COMMON_VALIDATION` | • models missing, more than 8, or a value
        outside the allowed list • promptIDs more than 500 • repeatCount out of
        range (1 to 100) |

        | 400 | `RUN_PROMPT_TARGET_REQUIRED` | Exactly one of promptIDs or
        promptSetID was not specified |

        | 400 | `PROMPT_SET_EMPTY` | The specified set has no prompts to run |

        | 400 | `MODEL_NOT_SUPPORTED` | model value not supported by the
        Platform API |

        | 400 | `MODEL_DISCONTINUED` | A discontinued model was requested (no
        models are currently discontinued). Discontinued models do not appear in
        `GET /models` either |

        | 400 | `NO_AVAILABLE_PLATFORM` | All requested models are currently
        unavailable for collection |

        | 400 | `REGION_NOT_SUPPORTED` | Unsupported region code |

        | 400 | `REGION_NOT_SUPPORTED_FOR_MODEL` | Region not supported by the
        model |

        | 400 | `LOCATION_NOT_SUPPORTED` | Unsupported location code (a value
        not in `GET /locations`) |

        | 400 | `LOCATION_REGION_MISMATCH` | Location does not belong to the
        specified region |

        | 400 | `LOCATION_NOT_SUPPORTED_FOR_MODEL` | One or more of the
        requested models does not support this location |

        | 400 | `QUESTION_NOT_MARKETING_PLATFORM` | Prompt does not belong to
        the Platform API |

        | 400 | `RUN_TOO_MANY_TASKS` | Total number of runs (prompts × models ×
        repeats) exceeds 10,000 |

        | 401 | `COMMON_UNAUTHORIZED` | API key or access token is missing or
        invalid |

        | 402 | `INSUFFICIENT_CREDITS` | Organization credit balance is lower
        than the unit price of this request |

        | 403 | `MODEL_NOT_GRANTED` | A model that requires a separate agreement
        (`CLAUDE`, `PERPLEXITY`, `GROK`, `DEEPSEEK`) was requested without the
        grant (it does not appear in `GET /models` either) |

        | 404 | `PROMPT_NOT_FOUND` | Prompt does not exist or belongs to another
        organization |

        | 404 | `PROMPT_SET_NOT_FOUND` | Set does not exist or belongs to
        another organization |

        | 404 | `CAMPAIGN_NOT_FOUND` | The campaign the prompt belongs to was
        not found |

        | 429 | `PLATFORM_RATE_LIMIT_EXCEEDED` | Rate limit exceeded. Wait the
        number of seconds in the `Retry-After` header, then retry |

        | 500 | — | Internal server error. Returns `message` and `requestID`
        without `code` |
      operationId: submitPlatformRun
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/domain.SubmitRunRequest'
        description: Prompt run request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.SubmitRunResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.ValidationError'
          description: >-
            models missing or more than 8, promptIDs more than 500, repeatCount
            out of range (1 to 100). For 400 codes related to run target, model,
            region, and location, see the error table above
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.UnauthorizedError'
          description: API key or access token is missing or invalid
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.InsufficientCreditsError'
          description: >-
            The credits required for the run size (models × prompts × repeats)
            exceed the balance
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.ModelNotGrantedError'
          description: >-
            This model requires a separate agreement. It is not granted to the
            organization
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.PromptNotFoundError'
          description: >-
            The prompt (PROMPT_NOT_FOUND) or prompt set (PROMPT_SET_NOT_FOUND)
            was not found (including ones owned by another organization)
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.RateLimitExceededError'
          description: >-
            Rate limit exceeded. Wait the number of seconds in the Retry-After
            header, then retry
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/domain.InternalServerError'
          description: >-
            Internal server error. Include the requestID in your report so it
            can be traced
      security:
        - OrgAPIKeyAuth: []
components:
  schemas:
    domain.SubmitRunRequest:
      properties:
        location:
          description: >-
            Run location (city-level, below the country). If omitted, the run
            uses the region (country) level. Only codes retrievable from GET
            /locations are allowed, and if region is also specified, the
            location must belong to that region. If region is omitted, the run
            uses the location's region. Every requested model must support this
            location (check with GET /locations?model=).
          example: US-NEW_YORK
          type: string
        models:
          description: >-
            List of models to run. Only values retrievable from GET /models are
            allowed. Discontinued models are rejected with 400
            MODEL_DISCONTINUED before validation, so they are not kept in the
            oneof list (none at present)
          example:
            - CHATGPT
            - GEMINI
          items:
            $ref: '#/components/schemas/domain.RunModel'
          maxItems: 13
          minItems: 1
          type: array
          uniqueItems: false
        promptIDs:
          description: >-
            List of prompt IDs to run (1 to 500, duplicates count once). Specify
            exactly one of this or promptSetID
          example:
            - cM0RPoxbNbJy0mS-MhsHOg
          items:
            type: string
          maxItems: 500
          minItems: 1
          type: array
          uniqueItems: false
        promptSetID:
          description: >-
            ID of the prompt set to run: runs every prompt in the set. Specify
            exactly one of this and promptIDs. There is no 500-prompt limit on
            the set size; only the total run limit (10,000) applies
          example: IkVMHhjFWcBXcJ41-h9yBQ
          type: string
        region:
          description: >-
            Run region (ISO 3166-1 alpha-2). Defaults to KR when omitted.
            Unsupported codes return 400. Supported regions may differ by model
            (check with GET /regions?model=)
          example: KR
          type: string
        repeatCount:
          description: Number of repeated runs per prompt (question) (default 1, max 100).
          example: 1
          maximum: 100
          minimum: 1
          type: integer
      required:
        - models
      type: object
    domain.SubmitRunResponse:
      properties:
        id:
          description: >-
            ID of the created prompt run. Pass this value as is as the runID of
            the run status endpoint (GET /v1/platform/runs/{runID})
          example: S8cqDSjSot67bCK6YtmvHw
          type: string
      type: object
    domain.ValidationError:
      properties:
        code:
          description: Error code
          example: COMMON_VALIDATION
          type: string
        details:
          description: 'List of reasons per violating field (one "field: reason" per line)'
          example:
            - 'limit: must be 100 or less'
          items:
            type: string
          type: array
          uniqueItems: false
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Data validation failed
          type: string
      type: object
    domain.UnauthorizedError:
      properties:
        code:
          description: Error code
          example: COMMON_UNAUTHORIZED
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Unauthenticated user
          type: string
      type: object
    domain.InsufficientCreditsError:
      properties:
        code:
          description: Error code
          example: INSUFFICIENT_CREDITS
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Insufficient credits.
          type: string
      type: object
    domain.ModelNotGrantedError:
      properties:
        code:
          description: Error code
          example: MODEL_NOT_GRANTED
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: >-
            This model is not granted to the organization. An agreement is
            required to use it
          type: string
      type: object
    domain.PromptNotFoundError:
      properties:
        code:
          description: Error code
          example: PROMPT_NOT_FOUND
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Prompt not found
          type: string
      type: object
    domain.RateLimitExceededError:
      properties:
        code:
          description: Error code
          example: PLATFORM_RATE_LIMIT_EXCEEDED
          type: string
        message:
          description: >-
            Error message (Korean by default, English when Accept-Language: en
            is specified)
          example: Too many requests. Please try again later.
          type: string
      type: object
    domain.InternalServerError:
      properties:
        message:
          description: Error message (not localized)
          example: Internal Server Error
          type: string
        requestID:
          description: >-
            Request identifier to reference in support inquiries (same value as
            the X-Request-Id response header)
          example: bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk
          type: string
      type: object
    domain.RunModel:
      enum:
        - CHATGPT
        - GOOGLE_OVERVIEW
        - GOOGLE_AI
        - PERPLEXITY
        - GEMINI
        - NAVER_AI_BRIEFING
        - NAVER_AI_TAB
        - CLAUDE
        - META_MUSE
        - BAIDU_AI_SEARCH
        - GROK
        - BAIDU_AI_TAB
        - DEEPSEEK
      type: string
      x-enum-comments:
        RunModelBaiduAISearch: >-
          Model that requires a separate agreement (FND-2490). For organizations
          without the grant, it is hidden from GET /models and submitting
          returns 403 MODEL_NOT_GRANTED
        RunModelBaiduAITab: >-
          Model that requires a separate agreement (FND-2493). Hidden from GET
          /models for organizations without the grant, and submission returns
          403 MODEL_NOT_GRANTED
        RunModelDeepSeek: >-
          Model that requires a separate agreement (FND-2489). Hidden from GET
          /models for organizations without the grant, and submissions are
          rejected with 403 MODEL_NOT_GRANTED
        RunModelGrok: >-
          Model that requires a separate agreement (FND-2488). Hidden from GET
          /models for organizations without the grant, and submitting returns
          403 MODEL_NOT_GRANTED
        RunModelMetaMuse: >-
          Model that requires a separate agreement (FND-2487). For organizations
          without the grant, it is hidden from GET /models and submitting
          returns 403 MODEL_NOT_GRANTED
        RunModelPerplexity: >-
          Model that requires a separate agreement (FND-2390). Hidden from GET
          /models for organizations without the grant, and submission returns
          403 MODEL_NOT_GRANTED
      x-enum-varnames:
        - RunModelChatGPT
        - RunModelGoogleOverview
        - RunModelGoogleAI
        - RunModelPerplexity
        - RunModelGemini
        - RunModelNaverAIBriefing
        - RunModelNaverAITab
        - RunModelClaude
        - RunModelMetaMuse
        - RunModelBaiduAISearch
        - RunModelGrok
        - RunModelBaiduAITab
        - RunModelDeepSeek
  securitySchemes:
    OrgAPIKeyAuth:
      description: '"Enter your organization API key. Example: ''cs_live_xxxx''"'
      in: header
      name: API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.