Skip to main content

🎨 Goblin AI

Image generation from Python or a local browser interface

PyPI version Python Downloads License


Goblin image styles

Install · Generate · Server and UI


Generate AI images from Python or a local browser interface, with optional CPU/GPU upscaling. No account or personal API key is needed for ordinary use. First use performs setup; later calls reuse a managed session.

Read the documentation · Complete Python API · HTTP API · Troubleshooting

Install

Use CPython 3.11–3.14 with a wheel matching your OS and architecture. Release targets are Windows/Linux x86-64 and macOS Intel/Apple Silicon. PyPy and other Python ABIs are unsupported.

pip install goblin-ai

The base install includes generation, prompt tools, PNG enhancement, interpolation, CLI, UI and HTTP API. Install one AI inference backend for neural upscaling:

pip install "goblin-ai[cpu]"
# Or, in a separate environment for NVIDIA CUDA:
pip install "goblin-ai[gpu]"

On Intel macOS with CPython 3.14, the base install works, but the CPU neural extra has no compatible ONNX Runtime wheel. Use CPython 3.13 for neural upscaling on Intel macOS, or use another supported platform.

Choose CPU or GPU, rather than installing both runtimes in the same environment. The quality, best and all extras remain CPU aliases; they no longer install the old PyTorch/BasicSR stack. Models download on their first explicit use and are cached in the user's cache directory. GOBLIN_MODEL_DIR can select another writable cache directory.

See installation and first image for environment setup and device verification.

Generate

import asyncio
from goblin import generate, close

async def main():
    try:
        image = await generate("a red ceramic teapot", model="goblin-flux", output="teapot.png")
        print(f"Saved {len(image)} bytes")
    finally:
        await close()

asyncio.run(main())

generate() returns image bytes. Use enhance_output=False to keep the provider's original bytes. Model aliases include goblin-flux, goblin-anime, goblin-realistic and goblin-sd; use list_models() for the catalog.

Default enhanced output is PNG at 768×768. Local processing accepts 8-bit grayscale, RGB and RGBA images; PNG output preserves transparency, resizing alpha to match the output dimensions. Set width and height for another size. First-use setup, remote queueing and image generation take additional time; session reuse avoids repeating setup.

What you can do

Feature Entry points Guide
Simple/batch generation generate, generate_batch Generation
Explicit lifecycle and metadata Goblin, GenerateRequest Advanced generation
Automatic model selection auto_map, detect_model Models and prompts
Catalog discovery and presets list_models, get_model_*, preset dictionaries Models and prompts
Local prompt tools random_prompt, create_variations, build_prompt Prompt tools
Resize/neural upscaling enhance, upscale, upscale_default, upscale_ultra Upscaling
Device/cache management set_device, get_device_info, download_model Upscaling
CLI, UI and REST API goblin server, goblin ui, create_app Server

The API reference documents every public export, constructor and class method, including argument defaults and return behavior.

Upscaling

upscale_default(image_bytes, width, height, preset="auto") selects a practical preset. fast uses interpolation without a neural model; balanced uses compact SPAN, quality uses MoSR, photo uses 2× RealPLKSR, and best uses DAT2. Neural models require a CPU or GPU extra. No single preset is best for every image; see model attribution for model origins and attribution.

from pathlib import Path
from goblin import upscale_default

image = Path("teapot.png").read_bytes()
larger = upscale_default(image, 1536, 1536, preset="auto")
Path("teapot-large.png").write_bytes(larger)

Automatic processing prioritizes speed. Restoration is opt-in. See the upscaling guide for measured timings, direct models, progress callbacks, CPU/GPU selection and cache management.

Server and UI

goblin server --port 8000
goblin ui --port 8000
goblin --port 8000

The legacy flag-only CLI remains supported. The server binds to localhost by default. /health reports initialization and readiness; generation returns HTTP 503 while initialization is incomplete, has failed, or the managed session is unavailable. Generation and upscaling requests have resource and per-client request limits. Use an authenticated reverse proxy when exposing the service publicly.

curl -X POST http://127.0.0.1:8000/generate -H "Content-Type: application/json" -d '{"prompt":"a red ceramic teapot","model":"goblin-flux","width":768,"height":768,"upscale_preset":"fast"}' --output teapot.png

Use curl.exe in Windows PowerShell when curl is an alias. /docs provides an interactive HTTP reference; see all endpoints and request/response examples.

Distribution and support

Releases distribute platform-specific compiled wheels, with no source distribution. Compiled modules cannot make reverse engineering impossible.

Generation depends on an upstream service. Setup, queueing and network latency can vary, and upstream changes can affect availability.

Report a minimal example with Goblin/Python versions, OS and chosen extra in the issue tracker. Keep credentials and session cache contents out of public reports. Goblin uses a proprietary license; downloaded models retain their separate author licenses.

Metadata

Release files for goblin-ai 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for goblin-ai 2.1.2
File Actions
goblin_ai-2.1.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for goblin_ai-2.1.2-cp314-cp314-win_amd64.whl
goblin_ai-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for goblin_ai-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.2-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for goblin_ai-2.1.2-cp314-cp314-macosx_11_0_arm64.whl
goblin_ai-2.1.2-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details for goblin_ai-2.1.2-cp314-cp314-macosx_10_15_x86_64.whl
goblin_ai-2.1.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for goblin_ai-2.1.2-cp313-cp313-win_amd64.whl
goblin_ai-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for goblin_ai-2.1.2-cp313-cp313-macosx_11_0_arm64.whl
goblin_ai-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details for goblin_ai-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl
goblin_ai-2.1.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for goblin_ai-2.1.2-cp312-cp312-win_amd64.whl
goblin_ai-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for goblin_ai-2.1.2-cp312-cp312-macosx_11_0_arm64.whl
goblin_ai-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details for goblin_ai-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl
goblin_ai-2.1.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for goblin_ai-2.1.2-cp311-cp311-win_amd64.whl
goblin_ai-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for goblin_ai-2.1.2-cp311-cp311-macosx_11_0_arm64.whl
goblin_ai-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details for goblin_ai-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl

Total release size: 44.1 MB

Release files / goblin_ai-2.1.2-cp314-cp314-win_amd64.whl

Download URL goblin_ai-2.1.2-cp314-cp314-win_amd64.whl
Size 2.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
0aeb73c820c69523346d48cd68c8c20fd3ce2bf9819cd1a566930149f9ee2f99
BLAKE2b-256 checksum
How to use checksums
4cfd7a2147608db46aceac15d98c1f89ae0e1c5d7da7c8abb2e1a44f520fa0b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.7 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
770ac06922d7f2a45ac2c0fac7cc972e8062ae5a223617b63e958d620a31c4b1
BLAKE2b-256 checksum
How to use checksums
3ef7e4ccace28ceeaa254892947662f7df6a1319bbe275cb36faf7541f5458aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp314-cp314-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.2-cp314-cp314-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b24f1e53995197c678d7a121722d6f73db806d215290aea34f5df9b822407daa
BLAKE2b-256 checksum
How to use checksums
981c7bb25b17156b9d9f8d5f3c60c20dd7f6b6cebd08b60407baf79c7aa04a8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp314-cp314-macosx_10_15_x86_64.whl

Download URL goblin_ai-2.1.2-cp314-cp314-macosx_10_15_x86_64.whl
Size 2.3 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
72d8b8995dda58c36dc067ae16ee2b4351d80170d59cd6c4463d354c5aa0ebc9
BLAKE2b-256 checksum
How to use checksums
9e88f42d16cd87f9651171f0e0e6c57c4ba8ce36e8fdde2ed67e2314e3ed1b48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp313-cp313-win_amd64.whl

Download URL goblin_ai-2.1.2-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
122743c5d7b8c2a1821ca9b61abf650a58b943a2c362054de2daa73976d11e49
BLAKE2b-256 checksum
How to use checksums
eecd6e8989018f85f73ac237b03cfc0f62a1d4d2df82544ac8d8902971e61675
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7f084d39f3e0412e6f2bc42b876ae3a14e5fef5a6aaa8c6e56fe6896ce424dcb
BLAKE2b-256 checksum
How to use checksums
dbbfd0ffcff747e6cc0cf8d8c30d724875db7f5773e695066c5d2acaf4c1ba49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.2-cp313-cp313-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
76e454a583e851fa2256c7f70fa1a8b9bdb4e50b8c48da8c96a32998b50c95fe
BLAKE2b-256 checksum
How to use checksums
0c20d87ce0adda88d384ae1f39d5ebe980cf735130e6bcda688572d2ed9922ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl
Size 2.3 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
8f327067f768b0640d0cfdba309567528f20ed46c340fa6141192c4bde5166ba
BLAKE2b-256 checksum
How to use checksums
4dfa365e352014c4154557246d4ed3ccda9eefa448f9958e2ca412704909b073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp312-cp312-win_amd64.whl

Download URL goblin_ai-2.1.2-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
de04c95baa25be57ff11ea319d9105b95abfbb2c1044e5edc7fe1146db6f6397
BLAKE2b-256 checksum
How to use checksums
92325977c97b695e8f224b887bab8eca28256a343f6d9d2344d2bbee15c82270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
98695d3c649392706c9e9df43885b0958a5b9887530eb2fac3f563c4b880cab7
BLAKE2b-256 checksum
How to use checksums
d6bc8c61904f92ea400c4a18f37fd8f38879d13b1d431f06c1c701452aca6379
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.2-cp312-cp312-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
99a0cd2e53049ddd824304403b97b142241b2ef83e9ff6e78fa0e177b931a514
BLAKE2b-256 checksum
How to use checksums
1386d5736b0f5d176bcf321fd68500b26952aa1a888453cc9fabbbf544f8995a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
9acdc81ac23a176472cfba08ece5ef2ffce61b6c1d6bdc49d3c4b30b7c3b00da
BLAKE2b-256 checksum
How to use checksums
f5e0b1e9298ea3e1c34d5048dc6b681b1e524f0f6b5a4307fff5bcb9653d6667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp311-cp311-win_amd64.whl

Download URL goblin_ai-2.1.2-cp311-cp311-win_amd64.whl
Size 2.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
82949e04f0b3b5638857c7d2689288a36e9bf83421b9e24c93169a6ef28fb8ec
BLAKE2b-256 checksum
How to use checksums
5b011a978719f0efd6b53bea0e2992c6851f004e9698f41250119d105d927d6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a86ae1c498e34daee89417d39dd95f4731917a8d8ac3bdddf9500c1bfe6eb66d
BLAKE2b-256 checksum
How to use checksums
50c36c5c1145cbcefd5eaf91e24831dee592a27f86d1dd9c567f2197d7b49353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.2-cp311-cp311-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d85322d0c506e263e16b3cad305d7d142046dca10f8dc5c41e3a16b148b9525f
BLAKE2b-256 checksum
How to use checksums
6468658abd1f0c1a699fbeae92dae745dbee7018c6e658a85cce2383e6296333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / goblin_ai-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl

Download URL goblin_ai-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
31a9dcc5427a59571f27a6f6d31d22302c18c2163191f8e9563b96fe962cc9d3
BLAKE2b-256 checksum
How to use checksums
2fe5d14ed3d5fa5717cace04030cbb8a4bfa3baee5b0860540d3accc6a726a57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for goblin-ai 2.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page