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

# Create Prompt from Text(텍스트로 프롬프트 생성)



## OpenAPI

````yaml https://beta.flamel.app/api-json post /api/images/textToPrompt
openapi: 3.0.0
info:
  title: Flamel API 문서
  description: REST API 문서입니다. 발급받은 API키를 X-Api-Key 헤더에 넣은 뒤 api를 사용하면 됩니다.
  version: '1.1'
  contact: {}
servers:
  - url: http://localhost:4010
    description: Local
  - url: https://beta.flamel.app
    description: Beta
security: []
tags:
  - name: Flamel
    description: ''
paths:
  /api/images/textToPrompt:
    post:
      tags:
        - images
      summary: Create Prompt from Text(텍스트로 프롬프트 생성)
      operationId: ImagesApiController_textToPrompt
      parameters:
        - name: X-Platform
          in: header
          description: 플랫폼 구분 (web, app, figma)
          required: false
          schema:
            type: string
            enum:
              - web
              - app
              - figma
              - api
            default: web
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - text
              properties:
                text:
                  type: string
                  example: A dog is running in the park
                  description: input text(입력 텍스트)
                styleId:
                  type: number
                  example: 123
                  nullable: true
                  description: style id(스타일 아이디)
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  initialPrompt:
                    type: string
                    description: user input prompt(유저 입력 프롬프트)
                  enhancedPrompt:
                    type: string
                    description: ttp result(텍스트2프롬프트 결과)
                  ttpLogId:
                    type: number
                    description: ttpLog id(ttpLog 아이디)
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                InvalidApiKey:
                  summary: Invalid API KEY(API KEY 틀림)
                  value:
                    success: false
                    code: 401
                    data: wrong_api_key
                ApiKeyExpired:
                  summary: API KEY Expired(API KEY 만료)
                  value:
                    success: false
                    code: 401
                    data: api_key_expired
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                NotLoggedIn:
                  summary: Not Logged In(로그인 안 함)
                  value:
                    success: false
                    code: 403
                    data: not_logged_in
                PromptUsageLimit:
                  summary: Prompt Usage Limit Exceeded(프롬프트 사용 한도 초과)
                  value:
                    success: false
                    code: 403
                    data: prompt_usage_limit
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                NoPrompt:
                  summary: No Prompt(프롬프트 없음)
                  value:
                    success: false
                    code: 422
                    data: no_prompt_exception(:sup, :main, :sub)
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````