MCP Control
Коммуникации · Изменение

Коммуникации · Генерация · Изображение

communications_generate_image
Контактные карточки и телефон

Попробуйте три запроса

Подготовить
  1. Вы указываетеОбъект
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Коммуникации / Генерация / Изображение». Для изменения нужны entityType, объект. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
entityType
Параметр
entityId
Объект
prompt
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Коммуникации / Генерация / Изображение» с параметром entityType = customer. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
entityType
customer
entityId
DEMO-101
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Коммуникации / Генерация / Изображение» по исходному ответу. Покажи состояние, результат. Объясни, чем подтвердить эффект для выбранного объекта.
Как проследить одну попытку
  1. ЗапросСохранить исходный ключ
  2. ОтветПроверить статус
  3. ПроверкаСверить эффект операции
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.

Описание разработчика

Generate one GPT image, upload it to private Cloudflare R2, and return both its managed mediaId and a 15-minute direct Cloudflare link. A stable authenticated URL is also returned. To send it through an integration, use communications_send with attachments:[{mediaId}]. Sending retains recipient validation, confirmation and delivery recovery; this Action does not send. Refresh an expired Cloudflare link through communications_get_generated_image_result without repeating GPT.

Параметры запроса
entityType
Existing recipient customer, or the active company for a reusable image. Customer images require current customer media access. обязательно по схеме · string · варианты customer, company
entityId
Exact existing customer ID, or the authenticated company ID. Never a name or external address. обязательно по схеме · string · до символов 128
prompt
Image brief sent to the existing company GPT service. обязательно по схеме · string · до символов 4000
imageModel
Optional company-configured image model; omit for the native default. необязательно · string
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
state
The managed image is stored and readable with current permissions. обязательно по схеме · string
result
Use the mediaId in the existing communications_send lifecycle. обязательно по схеме · object
Поля и технические схемы
Входные поля и поля ответа communications_generate_image
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "entityType": {
      "type": "string",
      "enum": [
        "customer",
        "company"
      ],
      "description": "Existing recipient customer, or the active company for a reusable image. Customer images require current customer media access."
    },
    "entityId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Exact existing customer ID, or the authenticated company ID. Never a name or external address."
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000,
      "description": "Image brief sent to the existing company GPT service."
    },
    "imageModel": {
      "description": "Optional company-configured image model; omit for the native default.",
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,79}$"
    },
    "requestId": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Stable original request ID. Use result lookup after uncertainty; never change it to repeat the provider call."
    }
  },
  "required": [
    "entityType",
    "entityId",
    "prompt",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "const": "completed",
      "description": "The managed image is stored and readable with current permissions."
    },
    "result": {
      "type": "object",
      "properties": {
        "mediaId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "Completed managed image. Pass attachments:[{mediaId}] to communications_send for an authorized recipient and integration."
        },
        "entityType": {
          "type": "string",
          "enum": [
            "customer",
            "company"
          ],
          "description": "Existing recipient customer, or the active company for a reusable image. Customer images require current customer media access."
        },
        "entityId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Exact existing customer ID, or the authenticated company ID. Never a name or external address."
        },
        "mimeType": {
          "type": "string",
          "enum": [
            "image/jpeg",
            "image/png",
            "image/webp"
          ],
          "description": "Sanitized image MIME type."
        },
        "byteLength": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 2560000,
          "description": "Verified managed image size, within the native message attachment limit."
        },
        "model": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Model reported by aiBridge."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Stable authenticated image link; requires the current account and media rights."
        },
        "cloudflareUrl": {
          "type": "string",
          "format": "uri",
          "description": "Direct Cloudflare R2 GET link, valid for 15 minutes. Treat as a bearer link and share only with the intended recipient."
        },
        "cloudflareUrlExpiresAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Expiry of cloudflareUrl; use communications_get_generated_image_result to obtain a fresh link."
        }
      },
      "required": [
        "mediaId",
        "entityType",
        "entityId",
        "mimeType",
        "byteLength",
        "model",
        "url",
        "cloudflareUrl",
        "cloudflareUrlExpiresAt"
      ],
      "additionalProperties": false,
      "description": "Use the mediaId in the existing communications_send lifecycle."
    }
  },
  "required": [
    "state",
    "result"
  ],
  "additionalProperties": false
}