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

# Изображение в изображение

> Используйте NovelAI преобразования изображения в изображение API для преобразования референсных изображений с переносом стиля, перерисовкой и визуальной генерацией с акцентом на аниме.



## OpenAPI

````yaml openapi/ru/novel.json POST /novelai/image-to-image
openapi: 3.1.0
info:
  title: Документация NovelAI API
  version: 1.0.0
  description: TTAPI Новый сервис AI API
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /novelai/image-to-image:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    ImageRequest:
      type: object
      properties:
        prompt:
          type: string
          description: Описание изображения для генерации или изменения
        model:
          type: string
          description: Модель для использования
          enum:
            - nai-diffusion-4-5-full
            - nai-diffusion-4-5-curated
        image:
          type: string
          example: https://xxx.png
          description: Эталонное изображение URL или base64
        'n':
          type: integer
          default: '1'
          example:
            - '1'
            - '2'
            - '3'
            - '4'
          description: Количество изображений для создания 1–4
        width:
          type: integer
          default: '1024'
          description: Ширина изображения
        height:
          type: integer
          default: '1024'
          description: Высота изображения
        seed:
          type: string
          description: Семя
        steps:
          type: integer
          description: Количество шагов отбора проб
          default: '23'
        scale:
          type: number
          description: >-
            Меньшая шкала наведения дает более мягкие и живописные результаты.
            Более высокая шкала наведения обеспечивает более мелкие детали и
            более резкие эффекты.
          default: '5'
        negative_prompt:
          type: string
          description: Нежелательный контент
        quality_toggle:
          type: boolean
          description: Переключение качества
          default: 'true'
        sampler:
          type: string
          description: Сэмплер
          default: Euler Ancestral
          enum:
            - Euler Ancestral
            - Euler
            - DPM++ 2S Ancestral
            - DPM++ 2M SDE
            - DPM++ 2M
            - DPM++ SDE
        noise_schedule:
          type: string
          description: График шума
          default: karras
          enum:
            - karras
            - exponential
            - polyexponential
        noise:
          type: number
          description: Шум изображения, 0 <= шум <= 0,99
          default: 0
        strength:
          type: number
          description: Сила, 0,01 <= сила <= 0,99
          default: 0.7
        character_prompts:
          type: array
          description: Список персонажей
          items:
            type: object
            properties:
              prompt:
                type: string
                description: Информация о персонаже
              uc:
                type: string
                description: Нежелательный контент персонажей
                example: blurred, extra accessories
              center:
                type: object
                description: Координаты центра персонажа в кадре
                properties:
                  x:
                    type: number
                    description: Координата ось X (между 0-1)
                    default: 0.5
                  'y':
                    type: number
                    description: Координата ось Y (между 0-1)
                    default: 0.5
                required:
                  - x
                  - 'y'
            required:
              - prompt
              - center
        vibe_transfer:
          type: array
          description: Справочник по передаче атмосферы
          items:
            type: object
            properties:
              image:
                type: string
                description: Изображение, URL или base64
                example: https://example.com/ref1.jpg
              strength:
                type: number
                description: Эталонная сила >= 0 <= 1
                default: 0.6
            required:
              - image
        character_reference:
          type: array
          description: Точная ссылка
          items:
            type: object
            properties:
              image:
                type: string
                description: Изображение, URL или base64
                example: https://example.com/ref2.jpg
              type:
                type: string
                description: Тип ссылки
                enum:
                  - character&style
                  - character
                  - style
                default: character&style
              strength:
                type: number
                description: >-
                  Сила эталона >= 0 <= 1. Более низкое значение дает ИИ больше
                  творческой свободы, более высокое значение заставляет ИИ более
                  точно следовать эталону, возможно, копируя выражения лица,
                  ракурсы и позы.
                default: 1
              fidelity:
                type: number
                description: Верность >= 0 <= 1
                default: 0
            required:
              - image
        hook_url:
          type: string
          description: >-
            Обратный вызов URL. О завершении или неудаче задачи будет отправлено
            на этот URL. Структура данных соответствует структуре <a
            href="fetch" target="_self">получение результата</a>.
      required:
        - prompt
        - model
        - image
  responses:
    SuccessResponse:
      description: Запрос выполнен успешно
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            required:
              - status
              - message
              - data
    400Response:
      description: Ошибка параметров
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Ошибка авторизации
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        Вы можете получить API-ключ в <a href='https://dashboard.ttapi.io'
        target='_blank'>панель управления TTAPI</a>.

````