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

# Responses

> Capriole AI Responses 모델로 OpenAI Responses 호환 출력을 만듭니다.

애플리케이션, SDK 또는 에이전트가 OpenAI Responses 요청 및 응답 형식을 기대할 때 이 엔드포인트를 사용하세요.

`model`과 `input`이 있는 표준 Responses 페이로드를 보내세요. Capriole AI는 업스트림 전달 전에 latest 별칭을 선택한 업스트림 모델 ID로 해석하고, `instructions`, `tools`, `reasoning`, `previous_response_id`, `stream` 같은 호환 필드를 전달하며, 업스트림 JSON 또는 SSE 스트림을 그대로 반환합니다.

`POST /v1/responses`는 `openai-latest`, `openai/gpt-5.6-terra`, `openai/gpt-5.6-luna`, `openai/gpt-5.5`, `openai/gpt-5.4-mini`를 받습니다. Capriole AI가 권장 OpenAI Responses 플래그십 모델을 선택하게 하려면 `openai-latest`를 사용하세요.

이 엔드포인트는 Claude 및 Google latest 별칭을 지원하지 않습니다. Grok 4.5, GLM 5.2, Kimi K3는 Chat Completions를 사용하므로 여기에서도 지원되지 않습니다. 모든 공개 모델을 하나의 OpenAI 호환 엔드포인트로 호출하려면 `POST /v1/chat/completions`를 사용하세요.

간단한 Capriole 네이티브 텍스트 생성에는 `POST /v1/chat`를 사용하세요. OpenAI Responses 전송 동작이 필요하면 `POST /v1/responses`를 사용하세요.


## OpenAPI

````yaml api-reference/openapi.json POST /v1/responses
openapi: 3.1.0
info:
  title: Capriole AI API
  description: >-
    Public API for model discovery, text chat, and protocol-compatible model
    endpoints.
  version: 1.0.0
servers:
  - url: https://api.caprioletech.com
security: []
paths:
  /v1/responses:
    post:
      summary: Create response
      description: >-
        Creates an OpenAI Responses-compatible response for models that use the
        Responses request and response format.
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              text:
                value:
                  model: openai-latest
                  input: Hello World!
              streaming:
                value:
                  model: openai/gpt-5.6-luna
                  input: Write a short Python function.
                  stream: true
      responses:
        '200':
          description: OpenAI Responses-compatible JSON response or SSE stream
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
            text/event-stream:
              schema:
                type: string
                description: OpenAI Responses-compatible SSE chunks.
        '400':
          $ref: '#/components/responses/ValidationOrDetailErrorResponse'
        '401':
          $ref: '#/components/responses/DetailErrorResponse'
        '403':
          $ref: '#/components/responses/DetailErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimitErrorResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
        '502':
          $ref: '#/components/responses/DetailErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ResponsesRequest:
      type: object
      additionalProperties: true
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: Public Responses-compatible model identifier or OpenAI latest alias
          enum:
            - openai-latest
            - openai/gpt-5.6-terra
            - openai/gpt-5.6-luna
            - openai/gpt-5.5
            - openai/gpt-5.4-mini
        input:
          description: OpenAI Responses input string or item list.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        instructions:
          type: string
          description: Optional system-level instructions.
        tools:
          type: array
          description: OpenAI Responses-compatible tool definitions.
          items:
            type: object
            additionalProperties: true
        reasoning:
          type: object
          description: OpenAI Responses-compatible reasoning options.
          additionalProperties: true
        stream:
          type: boolean
          default: false
          description: >-
            Stream the response as OpenAI Responses-compatible server-sent
            events.
    ResponsesResponse:
      type: object
      description: OpenAI Responses-compatible response body.
      additionalProperties: true
    ValidationError:
      type: object
      required:
        - detail
        - errors
      properties:
        detail:
          type: string
          description: Validation summary
        errors:
          type: array
          items:
            type: string
          description: Per-field validation errors
    DetailError:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error detail from the API
  responses:
    ValidationOrDetailErrorResponse:
      description: Validation error or request-level error response
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ValidationError'
              - $ref: '#/components/schemas/DetailError'
          examples:
            invalidPayload:
              value:
                detail: Invalid input parameters received.
                errors:
                  - >-
                    Field 'body -> input': String should have at least 1
                    character
    DetailErrorResponse:
      description: Error response with a detail message
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DetailError'
          examples:
            missingBearerToken:
              value:
                detail: Missing Bearer token
            invalidApiKey:
              value:
                detail: Invalid API key
            usageMetadataUnavailable:
              value:
                detail: Missing usage metadata
    RateLimitErrorResponse:
      description: Rate limit error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DetailError'
          examples:
            rateLimitExceeded:
              value:
                detail: 'Rate limit exceeded: 100 per 1 minute'
    InternalServerErrorResponse:
      description: Internal server error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DetailError'
          examples:
            internalServerError:
              value:
                detail: An internal server error occurred. Please try again later.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use an API key created in the Capriole AI page. Send it as
        `Authorization: Bearer sk-...`.

````