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

# Find Similar Media

> The project's indexed images that look most like this one, best first. The image itself isn't returned. The image must be indexed first. Finding similar images is free; indexing is charged per image.


Returns the project's indexed images that look most like this one, best first.
The image itself isn't included. The image must be
[indexed](https://docs.dreep.cloud/api-reference/image-search/index-media.md) first.

Finding similar images is free. Indexing is charged per image.

```bash theme={null}
curl "https://api.dreep.cloud/api/v1/media/2f928a3f-1d2a-4a2b/similar?limit=8&minScore=0.8" \
  -H "Authorization: Bearer drp_live_xxxxx"
```

Similar images usually score 0.8 and up. See
[Results and scores](https://docs.dreep.cloud/guides/image-search.md#results-and-scores).


## OpenAPI

````yaml GET /api/v1/media/{mediaId}/similar
openapi: 3.0.0
info:
  title: Dreep API
  description: The universal media processing and storage API.
  version: 1.0.0
servers:
  - url: https://api.dreep.cloud
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/media/{mediaId}/similar:
    get:
      tags:
        - Image Search
      summary: Find Similar Media
      description: >
        The project's indexed images that look most like this one, best first.
        The image itself isn't returned. The image must be indexed first.
        Finding similar images is free; indexing is charged per image.
      parameters:
        - name: mediaId
          in: path
          required: true
          description: An indexed image's ID.
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
        - name: minScore
          in: query
          description: Leave out matches scoring below this, from 0 to 1.
          schema:
            type: number
            minimum: 0
            maximum: 1
      responses:
        '200':
          description: Similar images, best first
          content:
            application/json:
              schema:
                type: object
                properties:
                  assets:
                    type: array
                    items:
                      $ref: '#/components/schemas/SearchResult'
        '400':
          description: Not an image in this project, or not indexed yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SearchResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
        filename:
          type: string
          example: red-sneaker.jpg
        url:
          type: string
          description: Ready-to-use delivery URL for the image.
          example: https://cdn.dreep.cloud/api/v1/fetch/2f928a3f-1d2a-4a2b
        type:
          type: string
          example: image/jpeg
        sizeBytes:
          type: string
          description: Size in bytes, as a string (a BIGINT column).
          example: '56696'
        assetType:
          type: string
          enum:
            - image
        folder:
          type: string
          example: products
        folderId:
          type: string
          format: uuid
          nullable: true
        createdAt:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
          example:
            - sneaker
            - red
        score:
          type: number
          description: >
            How close the match is, up to 1. Similar images usually score 0.8
            and up; text matches score much lower, usually 0.2 to 0.35.
          example: 0.31
    Error:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Invalid request parameters
        code:
          type: string
          example: invalid_request
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````

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