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

# [SC4] Generate Social Image

> Generates a LinkedIn-optimised AI image using Gemini. Supports 4 visual styles and 2 aspect ratios. Use as a standalone image action or as part of the Social Post Creator pipeline.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/social_post_creator_generate_social_image_action
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/social_post_creator_generate_social_image_action:
    post:
      tags:
        - Social Content Team
      summary: '[SC4] Generate Social Image'
      description: >-
        Generates a LinkedIn-optimised AI image using Gemini. Supports 4 visual
        styles and 2 aspect ratios. Use as a standalone image action or as part
        of the Social Post Creator pipeline.
      operationId: socialPostCreatorGenerateSocialImageAction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  x-ui: textarea
                  description: >-
                    Full text prompt for the image. If provided, this takes
                    priority over the topic field. Use for custom prompts or
                    when piping from another action.
                topic:
                  type: string
                  description: >-
                    The post topic the image should relate to. Used when prompt
                    is empty to auto-build a style-specific prompt.
                image_style:
                  type: string
                  enum:
                    - conceptual
                    - data_stat
                    - quote_card
                    - infographic
                  default: conceptual
                image_aspect_ratio:
                  type: string
                  enum:
                    - portrait
                    - square
                  description: Portrait (4:5) takes up more feed space on mobile.
                  default: portrait
                key_stat:
                  type: string
                  description: >-
                    Only for Data/Stat style. The number or stat to highlight
                    (e.g. '73% of brands...').
                key_quote:
                  type: string
                  description: Only for Quote Card style. The quote to render on the image.
                framework_desc:
                  type: string
                  description: >-
                    Only for Infographic style. The process or framework to
                    visualise.
                output_variable_name:
                  type: string
                  description: Variable name for the result (contains image_url).
                  default: social_image
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - image_style
                - image_aspect_ratio
                - output_variable_name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````