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

# تحرير صورة

> يطبّق تعديلات على صورة موجودة باستخدام النموذج والمطالبة المحددين.



## OpenAPI

````yaml ar/openapi/v1/openapi.localized.yaml POST /images/edits
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    واجهة API للبوابة تتيح الوصول إلى نماذج ذكاء اصطناعي متنوعة عبر نقاط نهاية
    متوافقة مع OpenAI.
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: التوجيه العالمي
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /images/edits:
    post:
      tags:
        - Gateway
      summary: إنشاء تعديل صورة
      description: ينشئ صورة معدّلة أو موسّعة استنادًا إلى صورة أصلية وموجّه.
      operationId: createImageEdit
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ImagesEditRequest'
      responses:
        '200':
          description: استجابة تعديل الصورة
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesEditResponse'
            text/event-stream:
              schema:
                type: string
components:
  schemas:
    ImagesEditRequest:
      type: object
      required:
        - model
        - image
        - prompt
      properties:
        model:
          type: string
        image:
          oneOf:
            - type: string
            - type: array
              minItems: 1
              maxItems: 16
              items:
                type: string
        mask:
          type: string
        prompt:
          type: string
        size:
          type: string
        resolution:
          type: string
        'n':
          type: integer
          minimum: 1
          maximum: 10
        quality:
          type: string
          enum:
            - standard
            - low
            - medium
            - high
            - xhigh
            - max
            - auto
          description: جودة عرض الصور. تتوفر xhigh وmax لنماذج GPT Image 2.5 فقط.
        stream:
          type: boolean
        partial_images:
          type: integer
          minimum: 0
          maximum: 3
        output_format:
          type: string
          enum:
            - png
            - jpeg
            - webp
        output_compression:
          type: integer
          minimum: 0
          maximum: 100
        background:
          type: string
          enum:
            - transparent
            - opaque
            - auto
        moderation:
          type: string
          enum:
            - auto
            - low
        input_fidelity:
          type: string
          enum:
            - high
            - low
        user:
          type: string
        meta:
          type: boolean
        usage:
          type: boolean
        provider:
          $ref: '#/components/schemas/ProviderRoutingOptions'
    ImagesEditResponse:
      type: object
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            $ref: '#/components/schemas/Image'
    ProviderRoutingOptions:
      type: object
      description: تفضيلات توجيه المزوّد لاختياره عبر البوابة.
      properties:
        order:
          type: array
          items:
            type: string
        only:
          type: array
          items:
            type: string
        ignore:
          type: array
          items:
            type: string
        include_alpha:
          type: boolean
          description: تضمين مزوّدي alpha في التوجيه (معطّل افتراضيًا).
        allow_fallbacks:
          type: boolean
          nullable: true
          description: السماح بالتحويل إلى مزوّد مؤهل آخر بعد الفشل.
        require_parameters:
          type: boolean
          nullable: true
          description: اشتراط دعم المزوّد للمعلمات المطلوبة قبل التوجيه.
        required_execution_region:
          type: string
          nullable: true
          description: قصر التوجيه على المزوّدين الذين لديهم منطقة التنفيذ المطلوبة.
        required_data_region:
          type: string
          nullable: true
          description: قصر التوجيه على المزوّدين الذين لديهم منطقة البيانات المطلوبة.
        require_zero_data_retention:
          type: boolean
          nullable: true
          description: >-
            قصر التوجيه على المزوّدين الذين يدعمون الاحتفاظ بالبيانات لمدة
            صفرية.
        data_collection:
          type: string
          nullable: true
          enum:
            - allow
            - deny
        zdr:
          type: boolean
          nullable: true
        enforce_distillable_text:
          type: boolean
          nullable: true
        quantizations:
          type: array
          nullable: true
          items:
            type: string
        sort:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            رتّب المزوّدين لهذا الطلب، مثلاً حسب السعر أو زمن الاستجابة أو معدل
            النقل.
        max_price:
          type: object
          properties:
            prompt:
              oneOf:
                - type: number
                - type: string
            completion:
              oneOf:
                - type: number
                - type: string
            image:
              oneOf:
                - type: number
                - type: string
            audio:
              oneOf:
                - type: number
                - type: string
            request:
              oneOf:
                - type: number
                - type: string
        preferred_min_throughput:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
        preferred_max_latency:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
    Image:
      type: object
      properties:
        url:
          type: string
        b64_json:
          type: string
        revised_prompt:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: المصادقة باستخدام رمز Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.