Accessibility Tools par oui

  • Content scaling 100%
  • Font size 100%
  • Line height 100%
  • Letter spacing 100%
Powered by OUI
  • Hub
  • Tools
  • Working better
  • Contact
Menu
  • Hub
  • Tools
  • Working better
  • Contact

Oui Create

Non défini

6 minute de lecture
Visual content generation API for images and videos using templates and dynamic elements

On this page

  • Introduction
  • Authentication
  • Templates
  • GET /api/templates
  • Parameters
  • Response
  • POST /api/templates
  • Request Body
  • GET /api/templates/{id}
  • Response
  • Elements
  • POST /api/templates/{template_id}/elements
  • PUT /api/elements/{id}
  • Request Body
  • Content Generation
  • POST /api/generations
  • Request Body
  • Response
  • GET /api/generations
  • Parameters
  • GET /api/generations/{id}
  • Response
  • Batch Generation
  • POST /api/generations/batch
  • Request Body
  • Response
  • GET /api/generations/batch/{batch_id}
  • Response
  • Assets
  • GET /api/assets
  • Response
  • POST /api/assets
  • Parameters
  • Categories
  • GET /api/categories
  • Response
  • POST /api/categories
  • Request Body
  • Error Codes

Other documents

  • Oui Compose
  • Oui Device
  • Oui Humans
  • Oui Incoming
  • Oui Monitor
  • Oui Outgoing
  • Work
  • Oui Engage
  • Oui Chat
  • Oui Answer
  • Cookie management
Visual content generation API for images and videos using templates and dynamic elements

Visual content generation API for images and videos using templates and dynamic elements

Version 1.0 • 41+ Endpoints

Base URL: https://oui-create:8890

Introduction

The Create API enables visual content generation including images and videos. It uses a template-based system with dynamic elements for positioning text, images, and other visual components.

Authentication

All API requests require authentication using an API key:

Authorization: Bearer your_api_key
# or
X-API-Key: your_api_key

Templates

GET /api/templates

List all available templates with pagination and filtering.

Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerResults per page (default: 20)
category_idintegerFilter by category
typestringimage, video
searchstringSearch by name

Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Social Media Banner",
      "slug": "social-media-banner",
      "type": "image",
      "width": 1200,
      "height": 630,
      "preview_url": "/templates/1/preview.jpg",
      "category": {
        "id": 5,
        "name": "Social Media"
      },
      "element_count": 5,
      "created_at": "2024-01-15T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 45
  }
}

POST /api/templates

Create a new template.

Request Body

{
  "name": "Instagram Story",
  "type": "image",
  "width": 1080,
  "height": 1920,
  "category_id": 5,
  "background_color": "#ffffff",
  "background_image_url": "https://example.com/bg.jpg"
}

GET /api/templates/{id}

Get template details with all elements.

Response

{
  "success": true,
  "data": {
    "id": 1,
    "name": "Social Media Banner",
    "type": "image",
    "width": 1200,
    "height": 630,
    "background_color": "#f5f5f5",
    "background_image_url": null,
    "elements": [
      {
        "id": 1,
        "type": "text",
        "name": "headline",
        "x": 50,
        "y": 100,
        "width": 500,
        "height": 80,
        "properties": {
          "font_family": "Arial",
          "font_size": 48,
          "font_weight": "bold",
          "color": "#333333",
          "text_align": "left"
        },
        "default_value": "Your Headline Here"
      },
      {
        "id": 2,
        "type": "image",
        "name": "product_image",
        "x": 600,
        "y": 50,
        "width": 500,
        "height": 500,
        "properties": {
          "fit": "cover",
          "border_radius": 10
        }
      }
    ]
  }
}

Elements

POST /api/templates/{template_id}/elements

Add an element to a template.

PUT /api/elements/{id}

Update an element's position, size, or properties.

Request Body

{
  "x": 100,
  "y": 150,
  "width": 600,
  "properties": {
    "font_size": 52,
    "color": "#000000"
  }
}

Content Generation

POST /api/generations

Generate an image or video from a template with dynamic values.

Request Body

{
  "template_id": 1,
  "values": {
    "headline": "Summer Sale - 50% Off!",
    "subtitle": "Limited time offer",
    "product_image": "https://example.com/product.jpg",
    "logo": "https://example.com/logo.png"
  },
  "output_format": "png",
  "quality": 90
}

Response

{
  "success": true,
  "data": {
    "id": "gen_abc123",
    "template_id": 1,
    "status": "completed",
    "output_url": "https://cdn.example.com/generations/gen_abc123.png",
    "width": 1200,
    "height": 630,
    "file_size": 245760,
    "created_at": "2024-01-22T14:30:00Z"
  }
}

GET /api/generations

List all generations with filtering options.

Parameters

ParameterTypeDescription
template_idintegerFilter by template
statusstringpending, processing, completed, failed
from_datedateFilter by date range

GET /api/generations/{id}

Get generation status and result.

Response

{
  "success": true,
  "data": {
    "id": "gen_abc123",
    "template_id": 1,
    "template_name": "Social Media Banner",
    "status": "completed",
    "values": {
      "headline": "Summer Sale - 50% Off!",
      "subtitle": "Limited time offer"
    },
    "output_url": "https://cdn.example.com/generations/gen_abc123.png",
    "output_format": "png",
    "width": 1200,
    "height": 630,
    "file_size": 245760,
    "render_time_ms": 1250,
    "created_at": "2024-01-22T14:30:00Z",
    "completed_at": "2024-01-22T14:30:01Z"
  }
}

Batch Generation

POST /api/generations/batch

Generate multiple images in a single request. Useful for creating variations or bulk content.

Request Body

{
  "template_id": 1,
  "items": [
    {
      "values": {
        "headline": "Product A - Now Available",
        "product_image": "https://example.com/product-a.jpg"
      }
    },
    {
      "values": {
        "headline": "Product B - 30% Off",
        "product_image": "https://example.com/product-b.jpg"
      }
    }
  ],
  "output_format": "png"
}

Response

{
  "success": true,
  "batch_id": "batch_xyz789",
  "total": 2,
  "status": "processing",
  "items": [
    {"id": "gen_001", "status": "pending"},
    {"id": "gen_002", "status": "pending"}
  ]
}

GET /api/generations/batch/{batch_id}

Get batch generation status and results.

Response

{
  "success": true,
  "batch_id": "batch_xyz789",
  "status": "completed",
  "total": 2,
  "completed": 2,
  "failed": 0,
  "items": [
    {
      "id": "gen_001",
      "status": "completed",
      "output_url": "https://cdn.example.com/gen_001.png"
    },
    {
      "id": "gen_002",
      "status": "completed",
      "output_url": "https://cdn.example.com/gen_002.png"
    }
  ]
}

Assets

GET /api/assets

List uploaded assets (images, fonts, etc.).

Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "company-logo.png",
      "type": "image",
      "mime_type": "image/png",
      "file_size": 15360,
      "url": "https://cdn.example.com/assets/company-logo.png",
      "width": 300,
      "height": 100,
      "created_at": "2024-01-10T10:00:00Z"
    }
  ]
}

POST /api/assets

Upload a new asset. Use multipart/form-data encoding.

Parameters

FieldTypeDescription
file requiredfileFile to upload (max: 10MB)
namestringOptional display name

Categories

GET /api/categories

List template categories.

Response

{
  "success": true,
  "data": [
    {"id": 1, "name": "Social Media", "slug": "social-media", "template_count": 25},
    {"id": 2, "name": "Email Headers", "slug": "email-headers", "template_count": 12},
    {"id": 3, "name": "Banners", "slug": "banners", "template_count": 18},
    {"id": 4, "name": "Thumbnails", "slug": "thumbnails", "template_count": 8}
  ]
}

POST /api/categories

Create a new category.

Request Body

{
  "name": "Product Cards",
  "description": "Templates for product showcase cards"
}

Error Codes

CodeStatusDescription
TEMPLATE_NOT_FOUND404Template does not exist
INVALID_VALUES400Missing or invalid element values
RENDER_FAILED500Image/video rendering failed
FILE_TOO_LARGE413Uploaded file exceeds size limit
INVALID_FORMAT400Unsupported file format

Et vous ?

Mieux travailler Discutons de vos besoins
  • Mentions légales
  • Confidentialité des données
  • Cgv

Oui © 2026

Merci de soutenir le projet


Ce projet ne peut pas exister sans votre soutien
Télécharger Soutenir