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

# Gemini 호환 콘텐츠 생성

> Gemini 호환 generateContent 엔드포인트입니다. 경로의 model은 APIAny.AI 공개 모델 ID입니다.



## OpenAPI

````yaml /ko/openapi.json post /v1beta/models/{model}:generateContent
openapi: 3.1.0
info:
  title: APIAny.AI 공개 API
  version: 1.0.0
  description: APIAny.AI의 모델 통합, 비동기 미디어 작업, 채팅 생성, 크레딧 조회 및 작업 조회를 위한 공개 API입니다.
servers:
  - url: https://apiany.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Models
    description: 공개 모델 카탈로그입니다.
  - name: Chat
    description: 텍스트 생성 및 채팅 호환 엔드포인트입니다.
  - name: Images
    description: 이미지 생성 및 이미지 편집 엔드포인트입니다.
  - name: Videos
    description: 동영상 생성 엔드포인트입니다.
  - name: Moderation
    description: Image safety and moderation endpoints.
  - name: Tasks
    description: 비동기 작업 조회입니다.
  - name: Account
    description: 계정 및 크레딧 조회입니다.
  - name: Free APIs
    description: Free utility APIs protected by API key rate limits.
paths:
  /v1beta/models/{model}:generateContent:
    post:
      tags:
        - Chat
      summary: Gemini 호환 콘텐츠 생성
      description: Gemini 호환 generateContent 엔드포인트입니다. 경로의 model은 APIAny.AI 공개 모델 ID입니다.
      operationId: generateGeminiContent
      parameters:
        - name: model
          in: path
          required: true
          schema:
            type: string
          example: gemini-3.5-flash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeminiGenerateContentRequest'
      responses:
        '200':
          description: Gemini 호환 응답입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeminiGenerateContentResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    GeminiGenerateContentRequest:
      type: object
      properties:
        contents:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
              parts:
                type: array
                items:
                  type: object
                  additionalProperties: true
            required:
              - parts
        generationConfig:
          type: object
          description: >-
            생성 설정입니다. 참고로, :generateContent 대신 :streamGenerateContent를 호출하면
            Gemini SSE 스트림을 받을 수 있습니다.
          properties:
            temperature:
              type: number
              minimum: 0
              maximum: 2
            topP:
              type: number
            topK:
              type: integer
            maxOutputTokens:
              type: integer
            stopSequences:
              type: array
              items:
                type: string
            responseMimeType:
              type: string
              description: 구조화된 출력에는 'application/json'과 같이 지정합니다.
            responseSchema:
              type: object
              additionalProperties: true
              description: >-
                구조화된 출력용 JSON Schema입니다(responseMimeType application/json과 함께
                사용).
            responseModalities:
              type: array
              items:
                type: string
              description: '''IMAGE''를 포함하면 이미지 생성 결과를 반환합니다.'
          additionalProperties: true
        tools:
          type: array
          description: 모델이 호출할 수 있는 functionDeclarations를 포함하는 도구입니다.
          items:
            type: object
            additionalProperties: true
        systemInstruction:
          type: object
          additionalProperties: true
          description: '시스템 지침으로, Gemini Content 객체({ parts: [{ text }] }) 형식입니다.'
      required:
        - contents
    GeminiGenerateContentResponse:
      type: object
      properties:
        candidates:
          type: array
          items:
            type: object
            additionalProperties: true
        usageMetadata:
          type: object
          additionalProperties: true
      required:
        - candidates
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - auth_error
                - rate_limit
                - insufficient_quota
                - content_policy
                - timeout
                - network_error
                - service_error
                - billable_error
                - unknown
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            code:
              type:
                - string
                - 'null'
          required:
            - type
            - message
      required:
        - error
  responses:
    BadRequest:
      description: 요청 파라미터가 유효하지 않습니다.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: API 키가 없거나 API 키가 유효하지 않습니다.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````