This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"mime/multipart" | |
"net/http" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const FormData = require('form-data'); | |
const fs = require('fs'); | |
// API configuration | |
const API_ENDPOINT = "https://api.backgroundcut.co/v2/cut/"; | |
const API_KEY = 'YOUR-API-KEY'; | |
const IMAGE_PATH = "/path/to/image.jpg"; | |
const LOCAL_OUTPUT_FILENAME = "/path/to/output.webp"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// API configuration | |
$apiEndpoint = "https://api.backgroundcut.co/v2/cut/"; | |
$apiKey = 'YOUR_API_KEY'; | |
$imagePath = "/path/to/file.jpg"; | |
$localOutputFilename = "/path/to/output.webp"; | |
// Request parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.exceptions import RequestException | |
# API configuration | |
API_ENDPOINT = "https://api.backgroundcut.co/v2/cut/" | |
API_KEY = 'YOUR-API-KEY' | |
IMAGE_PATH = "/path/to/image.jpg" | |
REQUEST_PARAMETERS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const fs = require('fs'); | |
// API configuration | |
const API_ENDPOINT = "https://backgroundcut.co/api/v1/cut/"; | |
const API_KEY = 'YOUR-API-KEY'; | |
const REQUEST_PARAMETERS = { | |
'file_url': 'https://www.example.com/example.jpg', | |
'max_resolution': '12000000', // 12 MegaPixels (for example 4000 * 3000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// API configuration | |
$apiEndpoint = "https://backgroundcut.co/api/v1/cut/"; | |
$apiKey = 'YOUR-API-KEY'; | |
$requestParameters = [ | |
'file_url' => 'https://www.example.com/example.jpg', | |
'max_resolution' => '12000000', // 12 MegaPixels (for example 4000 * 3000) | |
'quality' => 'medium', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.exceptions import RequestException | |
# API configuration | |
API_ENDPOINT = "https://backgroundcut.co/api/v1/cut/" | |
API_KEY = 'YOUR-API-KEY' | |
REQUEST_PARAMETERS = { | |
'file_url': 'https://www.example.com/example.jpg', | |
'max_resolution': '12000000', # 12 MegaPixels (for example 4000 * 3000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"mime/multipart" | |
"net/http" | |
"os" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies (npm install axios form-data) | |
const axios = require('axios'); | |
const FormData = require('form-data'); | |
const fs = require('fs'); | |
const path = require('path'); | |
// API configuration | |
const API_ENDPOINT = "https://backgroundcut.co/api/v1/cut/"; | |
const API_KEY = 'YOUR-API-KEY'; |
NewerOlder