A client of IXSPY AI Api
Project description
IXSPY AI API
IXSPY AI API V1.0 official python version
README.md
Installation
- pypi install
pip install ixspy-ai-api
- Source code install
git clone https://github.com/ixspyinc/ixspy-ai-api-python.git
cd ixspy-ai-api-python
python setup.py install
Usage
Basic usage
import os
import sys
from ixspy_ai_api import ImageClient
# 分步骤调用, 任务方法和参数都已约定好
API_KEY = 'YOUR_KEY'
FOLDER_PATH = os.path.dirname(os.path.abspath(sys.argv[0])) + os.sep
original_image_path = FOLDER_PATH + 'images/speaker.jpg'
client = ImageClient(api_key=API_KEY)
task_id = client.create_custom_composition(
original_image=original_image_path,
prompt="移除产品背景,只保留白色背景产品图",
)
print(f"任务ID: {task_id}")
# 轮询等待完成
result = client.wait_for_completion(task_id, poll_interval=3, timeout=180)
# 可和预生成的图片 examples/images/demo_result_create_custom_composition.png 对比
print("标清图URL:", result['sd_image_url'])
# 高清圖需要額外時間,這裏選擇多等待半分鐘
print('等待半分钟后获取高清图')
time.sleep(30)
# 获取高清图
hd_url = client.get_hd_image(task_id)
print("高清图URL:", hd_url)
Advance use
For detailed usage, please refer to the files in the /examples directory.
API document
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ixspy_ai_api-1.0.1.tar.gz.
File metadata
- Download URL: ixspy_ai_api-1.0.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1a15e5ccdc53e0240d4c196e78a66399d784edcf37e0e45a8a0549e29f36c8a
|
|
| MD5 |
3e108faa8c143b9ad032501e24c320d3
|
|
| BLAKE2b-256 |
4d17538ec0025d999aaddb8dbd76d3d2c0b8b35c58ac7832a4f2aedcab401685
|
Provenance
The following attestation bundles were made for ixspy_ai_api-1.0.1.tar.gz:
Publisher:
python-publish.yml on ixspyinc/ixspy-ai-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ixspy_ai_api-1.0.1.tar.gz -
Subject digest:
b1a15e5ccdc53e0240d4c196e78a66399d784edcf37e0e45a8a0549e29f36c8a - Sigstore transparency entry: 1224347842
- Sigstore integration time:
-
Permalink:
ixspyinc/ixspy-ai-api-python@69486e633113dfddac26901d8319c73daa686f90 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/ixspyinc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@69486e633113dfddac26901d8319c73daa686f90 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ixspy_ai_api-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ixspy_ai_api-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1278683b8db8f013fb04cafc3f37498fe041fe5ecb1a2993ce7be5e0a65b24b
|
|
| MD5 |
021a4d3f9d05c3fa610482241e2b47c9
|
|
| BLAKE2b-256 |
c796b06f3aa51e2b29856d6249c1e874884428e9b0b8d43fc680873a21709aa0
|
Provenance
The following attestation bundles were made for ixspy_ai_api-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on ixspyinc/ixspy-ai-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ixspy_ai_api-1.0.1-py3-none-any.whl -
Subject digest:
b1278683b8db8f013fb04cafc3f37498fe041fe5ecb1a2993ce7be5e0a65b24b - Sigstore transparency entry: 1224347843
- Sigstore integration time:
-
Permalink:
ixspyinc/ixspy-ai-api-python@69486e633113dfddac26901d8319c73daa686f90 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/ixspyinc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@69486e633113dfddac26901d8319c73daa686f90 -
Trigger Event:
release
-
Statement type: