# Photolab.me

[Try Demo](https://api.market/store/capix/photolab)

### About API <a href="#about-api" id="about-api"></a>

Photolab.me API is a powerful tool that allows developers to easily integrate a suite of advanced image processing features into their applications. With this API, users can transform their photos into stunning works of art, apply various filters, enhance colors, adjust brightness and contrast, and perform many other image manipulations with just a few lines of code.

***

{% hint style="warning" %}
Note: It is unofficial api of Photolab.me but we guarantene it works well and fast without any blocks and problems.
{% endhint %}

***

### Result <a href="#result" id="result"></a>

<figure><img src="https://telegra.ph/file/95b5632f3aa2aafec3628.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://telegra.ph/file/c8e5629fe73b197296e01.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://telegra.ph/file/a4a818a7008c9b51a4ba7.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://telegra.ph/file/e5e2397d0c2c543aa0515.png" alt=""><figcaption></figcaption></figure>

### Details <a href="#details" id="details"></a>

**1. Apply PhotoLab Effect - Version 1**

This endpoint is used to apply a specific PhotoLab effect to an image using a combo ID.

* **Endpoint**: `https://prod.api.market/api/v1/capix/photolab/photolab/v1/`
* **Method**: `POST`
* **Request Headers**:
  * `Content-Type: application/json`
  * `x-api-market-key: API_TOKEN`
* **Request Body**:

  ```
  {
    "image_url": "URL_OF_IMAGE",
    "combo_id": "COMBO_ID"
  }
  ```

**Parameters:**

* `image_url`: URL of the image to which the effect will be applied.
* `combo_id`: ID of the specific PhotoLab effect to apply.

**2. Apply PhotoLab Effect - Version 2**

Similar to Version 1, this endpoint allows users to apply a specific PhotoLab effect to an image using a combo ID.

* **Endpoint**: `https://prod.api.market/api/v1/capix/photolab/photolab/v2/`
* **Method**: `POST`
* **Request Headers**:
  * `Content-Type: application/json`
  * `x-api-market-key: API_TOKEN`
* **Request Body**:

  ```
  {
    "image_url": "URL_OF_IMAGE",
    "combo_id": "COMBO_ID"
  }
  ```

**Parameters:**

* `image_url`: URL of the image to which the effect will be applied.
* `combo_id`: ID of the specific PhotoLab effect to apply.

**3. Get PhotoLab Result**

This endpoint retrieves the result of a PhotoLab editing request based on the provided request ID.

* **Endpoint**: `https://prod.api.market/api/v1/capix/photolab/result/`
* **Method**: `POST`
* **Request Headers**:
  * `Content-Type: application/json`
  * `x-api-market-key: API_TOKEN`
* **Request Body**:

  ```
  {
    "request_id": "REQUEST_ID"
  }
  ```

**Parameters:**

* `request_id`: ID of the PhotoLab editing request for which the result is requested.

### Code snippets <a href="#code-snippets" id="code-snippets"></a>

**V1 with watermark**

{% tabs %}
{% tab title="Curl" %}

```sh
curl -X 'POST' \
  -H 'Content-Type: application/json' \
  -H 'x-api-market-key: API_KEY' \
  -d '{
    "image_url": "https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg",
    "combo_id": "23131838"
}' \
  'https://prod.api.market/api/v1/capix/photolab/photolab/v1/'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'x-api-market-key': 'API_KEY',
}

json_data = {
    'image_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'combo_id': '23131838',
}

response = requests.post('https://prod.api.market/api/v1/capix/photolab/photolab/v1/', headers=headers, json=json_data)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://prod.api.market/api/v1/capix/photolab/photolab/v1/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'x-api-market-key: API_KEY',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n    \"image_url\": \"https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg\",\n    \"combo_id\": \"23131838\"\n}");

$response = curl_exec($ch);

curl_close($ch);
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://prod.api.market/api/v1/capix/photolab/photolab/v1/',
  {
    'image_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'combo_id': '23131838'
  },
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-market-key': 'API_KEY'
    }
  }
);
```

{% endtab %}

{% tab title="Javascript" %}

```java
fetch('https://prod.api.market/api/v1/capix/photolab/photolab/v1/', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-market-key': 'API_KEY'
  },
  body: JSON.stringify({
    'image_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'combo_id': '23131838'
  })
});
```

{% endtab %}
{% endtabs %}

**V2 without watermark**

{% tabs %}
{% tab title="Curl" %}

```sh
curl -X 'POST' \
  -H 'Content-Type: application/json' \
  -H 'x-api-market-key: API_KEY' \
  -d '{
    "image_url": "https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg",
    "combo_id": "23131838"
}' \
  'https://prod.api.market/api/v1/capix/photolab/photolab/v2/'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'x-api-market-key': 'API_KEY',
}

json_data = {
    'image_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'combo_id': '23131838',
}

response = requests.post('https://prod.api.market/api/v1/capix/photolab/photolab/v2/', headers=headers, json=json_data)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://prod.api.market/api/v1/capix/photolab/photolab/v2/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'x-api-market-key: API_KEY',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n    \"image_url\": \"https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg\",\n    \"combo_id\": \"23131838\"\n}");

$response = curl_exec($ch);

curl_close($ch);
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://prod.api.market/api/v1/capix/photolab/photolab/v2/',
  {
    'image_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'combo_id': '23131838'
  },
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-market-key': 'API_KEY'
    }
  }
);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
fetch('https://prod.api.market/api/v1/capix/photolab/photolab/v2/', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-market-key': 'API_KEY'
  },
  body: JSON.stringify({
    'image_url': 'https://storage.ws.pho.to/s2/7aa4876bc1f50bc92fc54cb3c326181ac5bbf5ef_m.jpeg',
    'combo_id': '23131838'
  })
});
```

{% endtab %}
{% endtabs %}

**Result**

{% tabs %}
{% tab title="Curl" %}

```sh
curl -X 'POST' \
  -H 'Content-Type: application/json' \
  -H 'x-api-market-key: API_KEY' \
  -d '{
    "request_id": REQUEST_ID
}' \
  'https://prod.api.market/api/v1/capix/photolab/result/'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'x-api-market-key': 'API_KEY',
}

data = '{\n    "request_id": REQUEST_ID\n}'

response = requests.post('https://prod.api.market/api/v1/capix/photolab/result/', headers=headers, data=data)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://prod.api.market/api/v1/capix/photolab/result/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'x-api-market-key: API_KEY',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n    \"request_id\": REQUEST_ID\n}");

$response = curl_exec($ch);

curl_close($ch);
```

{% endtab %}

{% tab title="NodeJs" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://prod.api.market/api/v1/capix/photolab/result/',
  '{\n    "request_id": REQUEST_ID\n}',
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-market-key': 'API_KEY'
    }
  }
);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
fetch('https://prod.api.market/api/v1/capix/photolab/result/', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-market-key': 'API_KEY'
  },
  body: '{\n    "request_id": REQUEST_ID\n}'
});
```

{% endtab %}
{% endtabs %}

### Trending Combos <a href="#combo-ids" id="combo-ids"></a>

* <https://photolab.me/d/37890916>
* <https://photolab.me/d/38097826>
* <https://photolab.me/d/38105326>
* <https://photolab.me/d/38062877>
* <https://photolab.me/d/37978636>
* <https://photolab.me/d/37983184>

| Original                                                                                                                                                                                                                                                  | Result                                                                                                                                                                                                                                                    | Combo id |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FCznvGhPQRhs23piUlWZr%2Fimage.png?alt=media&#x26;token=97469d04-27c3-4352-8b8e-58d5bf990bbb" alt="" data-size="original"> | <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FZ57CvhRdnJ5bFv6lOBOm%2Fimage.png?alt=media&#x26;token=6c974c88-074d-4766-b295-f8f05cfa1e3f" alt="" data-size="original"> | 37890916 |
| <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FgWo2OwDv1bv1FqE9B2BC%2Fimage.png?alt=media&#x26;token=4298644b-6997-423d-896a-e96424c8b266" alt="" data-size="original"> | <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FCuXIUXQQq3RVq4I0G7j0%2Fimage.png?alt=media&#x26;token=bc4614ff-6ebf-4f4c-a243-b527b290a312" alt="" data-size="original"> | 38097826 |
| <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FW2Dw15Lxqp02lmkzlfgu%2Fimage.png?alt=media&#x26;token=f74cd519-daba-44ed-9cea-4451523083e4" alt="" data-size="original"> | <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2FOvlaxDPhRHbMBddjVilC%2Fimage.png?alt=media&#x26;token=1eee934d-6f76-48d3-985a-f42f3d4365ae" alt="" data-size="original"> | 38105326 |
| <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2Fq7UUJ5PykWmJceOgKRay%2Fimage.png?alt=media&#x26;token=c5ebf303-5bd1-4fa2-8b88-fa7851e7bd02" alt="" data-size="original"> | <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2Fhyb7jTkd8jAdCJBFyVv3%2Fimage.png?alt=media&#x26;token=6906c498-2a16-4b0e-a7c4-399e10a670e6" alt="" data-size="original"> | 37978636 |
| <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2F5SaC2L5XhYiX9oEKHSbF%2Fimage.png?alt=media&#x26;token=f928de15-5a72-492d-9e60-6c7235e26160" alt="" data-size="original"> | <img src="https://979396929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpzXHBiEL3zWqYljGVxS%2Fuploads%2F7jpA9fUXDMKpsCP6AWLB%2Fimage.png?alt=media&#x26;token=459d6453-765b-4bf3-94d7-5cff250e0cc7" alt="" data-size="original"> | 37983184 |

### Combo IDs <a href="#combo-ids" id="combo-ids"></a>

When interacting with the PhotoLab API, one of the fundamental steps is identifying and choosing a suitable combo ID. These combo IDs serve as unique identifiers for specific image editing combinations. To locate these IDs, you'll need to navigate to the PhotoLab website at <https://photolab.me/>.

Upon reaching the PhotoLab website, you'll encounter a plethora of image filters and editing options available for exploration. Each filter or editing combination is associated with a distinct combo ID. To illustrate, let's consider the example of visiting the page <https://photolab.me/d/31153495>.

As you land on this page, you'll notice various filters, effects, and editing tools showcased, each contributing to a unique visual outcome. Among these elements, the combo ID is prominently displayed as 31153495. This alphanumeric code serves as the key to accessing and applying the specific editing combination represented on this page.

***

{% hint style="warning" %}
Note: However, all combo ids are not supported directly. Photolab is growing fast and it develops AI based filters which means it is not supported in our API service system yet. You can check combo ids first before making your final decision.
{% endhint %}
