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

# Submit a run

> 조직의 프롬프트를 지정한 모델로 실행합니다. 정기 모니터링이 아니라 요청한 시점에 한 번 수행됩니다. 요청이 성공하면 프롬프트 실행(Run)이 생성됩니다. 실행 대상은 promptIDs(개별 프롬프트) 또는 promptSetID(프롬프트 세트 전체) 중 하나만 지정할 수 있으며, 둘을 동시에 사용할 수 없습니다. 진행 상태는 응답으로 받은 id를 사용해 프롬프트 실행 상태 조회에서 확인합니다.

### 오류

| HTTP | 코드 | 설명 |
| --- | --- | --- |
| 400 | `COMMON_BINDING` | • 요청 본문 JSON 파싱 실패 • promptIDs·promptSetID 형식 오류 (details 에 `PLATFORM_INVALID_ID`) |
| 400 | `COMMON_VALIDATION` | • models 누락·8개 초과·허용 목록 밖의 값 • promptIDs 500개 초과 • repeatCount 범위 위반(1~100) |
| 400 | `RUN_PROMPT_TARGET_REQUIRED` | promptIDs·promptSetID 중 정확히 하나를 지정하지 않음 |
| 400 | `PROMPT_SET_EMPTY` | 지정한 세트에 실행할 프롬프트가 없음 |
| 400 | `MODEL_NOT_SUPPORTED` | 플랫폼 API 가 지원하지 않는 model 값 |
| 400 | `MODEL_DISCONTINUED` | 서비스가 중단된 모델을 요청함 (현재 중단된 모델은 없음). 중단 모델은 `GET /models` 에도 나타나지 않음 |
| 400 | `NO_AVAILABLE_PLATFORM` | 요청한 모델이 현재 모두 수집 불가 |
| 400 | `REGION_NOT_SUPPORTED` | 지원하지 않는 지역 코드 |
| 400 | `REGION_NOT_SUPPORTED_FOR_MODEL` | 모델이 지원하지 않는 지역 |
| 400 | `LOCATION_NOT_SUPPORTED` | 지원하지 않는 위치 코드 (`GET /locations` 에 없는 값) |
| 400 | `LOCATION_REGION_MISMATCH` | 지정한 region 에 속하지 않는 위치 |
| 400 | `LOCATION_NOT_SUPPORTED_FOR_MODEL` | 요청한 모델 중 이 위치를 지원하지 않는 모델이 있음 |
| 400 | `QUESTION_NOT_MARKETING_PLATFORM` | 플랫폼 API 소속이 아닌 프롬프트 |
| 400 | `RUN_TOO_MANY_TASKS` | 총 실행 수(프롬프트 × 모델 × 반복)가 10,000 초과 |
| 401 | `COMMON_UNAUTHORIZED` | API 키 또는 액세스 토큰이 없거나 유효하지 않음 |
| 402 | `INSUFFICIENT_CREDITS` | 조직 크레딧 잔액이 이 요청의 단가보다 적음 |
| 403 | `MODEL_NOT_GRANTED` | 별도 계약이 필요한 모델(`CLAUDE`, `PERPLEXITY`, `GROK`, `DEEPSEEK`)을 권한 없이 요청함 (`GET /models` 에도 나타나지 않음) |
| 403 | `REGION_NOT_GRANTED` | 별도 계약이 필요한 지역을 권한 없이 요청함 (`GET /regions` 에도 나타나지 않음) |
| 404 | `PROMPT_NOT_FOUND` | 프롬프트가 없거나 타 조직 소유 |
| 404 | `PROMPT_SET_NOT_FOUND` | 세트가 없거나 타 조직 소유 |
| 404 | `CAMPAIGN_NOT_FOUND` | 프롬프트가 속한 캠페인을 찾을 수 없음 |
| 429 | `PLATFORM_RATE_LIMIT_EXCEEDED` | 요청 한도 초과. `Retry-After` 헤더의 초만큼 기다린 뒤 재시도 |
| 500 | — | 서버 내부 오류. `code` 없이 `message` 와 `requestID` 를 반환 |

See the [Running prompts](https://dev-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://dev-docs.trychainshift.ai/en/api-reference/runs/get-run-status.md) with the returned `runID`, and once it is `FINISHED`, query [List answers](https://dev-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: http://dev-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: >-
        조직의 프롬프트를 지정한 모델로 실행합니다. 정기 모니터링이 아니라 요청한 시점에 한 번 수행됩니다. 요청이 성공하면 프롬프트
        실행(Run)이 생성됩니다. 실행 대상은 promptIDs(개별 프롬프트) 또는 promptSetID(프롬프트 세트 전체) 중
        하나만 지정할 수 있으며, 둘을 동시에 사용할 수 없습니다. 진행 상태는 응답으로 받은 id를 사용해 프롬프트 실행 상태 조회에서
        확인합니다.


        ### 오류


        | HTTP | 코드 | 설명 |

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

        | 400 | `COMMON_BINDING` | • 요청 본문 JSON 파싱 실패 • promptIDs·promptSetID 형식
        오류 (details 에 `PLATFORM_INVALID_ID`) |

        | 400 | `COMMON_VALIDATION` | • models 누락·8개 초과·허용 목록 밖의 값 • promptIDs
        500개 초과 • repeatCount 범위 위반(1~100) |

        | 400 | `RUN_PROMPT_TARGET_REQUIRED` | promptIDs·promptSetID 중 정확히 하나를
        지정하지 않음 |

        | 400 | `PROMPT_SET_EMPTY` | 지정한 세트에 실행할 프롬프트가 없음 |

        | 400 | `MODEL_NOT_SUPPORTED` | 플랫폼 API 가 지원하지 않는 model 값 |

        | 400 | `MODEL_DISCONTINUED` | 서비스가 중단된 모델을 요청함 (현재 중단된 모델은 없음). 중단 모델은
        `GET /models` 에도 나타나지 않음 |

        | 400 | `NO_AVAILABLE_PLATFORM` | 요청한 모델이 현재 모두 수집 불가 |

        | 400 | `REGION_NOT_SUPPORTED` | 지원하지 않는 지역 코드 |

        | 400 | `REGION_NOT_SUPPORTED_FOR_MODEL` | 모델이 지원하지 않는 지역 |

        | 400 | `LOCATION_NOT_SUPPORTED` | 지원하지 않는 위치 코드 (`GET /locations` 에 없는
        값) |

        | 400 | `LOCATION_REGION_MISMATCH` | 지정한 region 에 속하지 않는 위치 |

        | 400 | `LOCATION_NOT_SUPPORTED_FOR_MODEL` | 요청한 모델 중 이 위치를 지원하지 않는 모델이
        있음 |

        | 400 | `QUESTION_NOT_MARKETING_PLATFORM` | 플랫폼 API 소속이 아닌 프롬프트 |

        | 400 | `RUN_TOO_MANY_TASKS` | 총 실행 수(프롬프트 × 모델 × 반복)가 10,000 초과 |

        | 401 | `COMMON_UNAUTHORIZED` | API 키 또는 액세스 토큰이 없거나 유효하지 않음 |

        | 402 | `INSUFFICIENT_CREDITS` | 조직 크레딧 잔액이 이 요청의 단가보다 적음 |

        | 403 | `MODEL_NOT_GRANTED` | 별도 계약이 필요한 모델(`CLAUDE`, `PERPLEXITY`,
        `GROK`, `DEEPSEEK`)을 권한 없이 요청함 (`GET /models` 에도 나타나지 않음) |

        | 403 | `REGION_NOT_GRANTED` | 별도 계약이 필요한 지역을 권한 없이 요청함 (`GET /regions`
        에도 나타나지 않음) |

        | 404 | `PROMPT_NOT_FOUND` | 프롬프트가 없거나 타 조직 소유 |

        | 404 | `PROMPT_SET_NOT_FOUND` | 세트가 없거나 타 조직 소유 |

        | 404 | `CAMPAIGN_NOT_FOUND` | 프롬프트가 속한 캠페인을 찾을 수 없음 |

        | 429 | `PLATFORM_RATE_LIMIT_EXCEEDED` | 요청 한도 초과. `Retry-After` 헤더의 초만큼
        기다린 뒤 재시도 |

        | 500 | — | 서버 내부 오류. `code` 없이 `message` 와 `requestID` 를 반환 |
      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: >-
            별도 계약이 필요한 모델(MODEL_NOT_GRANTED) 또는 지역(REGION_NOT_GRANTED)입니다. 조직에
            부여되지 않았습니다
        '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.