Skip to main content

Goblin AI

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.1

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.1
File Actions
goblin_ai-2.1.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for goblin_ai-2.1.1-cp314-cp314-win_amd64.whl
goblin_ai-2.1.1-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.17+ x86-64, Linux glibc 2.28+ x86-64 Details for goblin_ai-2.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for goblin_ai-2.1.1-cp314-cp314-macosx_11_0_arm64.whl
goblin_ai-2.1.1-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.1-cp314-cp314-macosx_10_15_x86_64.whl
goblin_ai-2.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for goblin_ai-2.1.1-cp313-cp313-win_amd64.whl
goblin_ai-2.1.1-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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for goblin_ai-2.1.1-cp313-cp313-macosx_11_0_arm64.whl
goblin_ai-2.1.1-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.1-cp313-cp313-macosx_10_13_x86_64.whl
goblin_ai-2.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for goblin_ai-2.1.1-cp312-cp312-win_amd64.whl
goblin_ai-2.1.1-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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for goblin_ai-2.1.1-cp312-cp312-macosx_11_0_arm64.whl
goblin_ai-2.1.1-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.1-cp312-cp312-macosx_10_13_x86_64.whl
goblin_ai-2.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for goblin_ai-2.1.1-cp311-cp311-win_amd64.whl
goblin_ai-2.1.1-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.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
goblin_ai-2.1.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for goblin_ai-2.1.1-cp311-cp311-macosx_11_0_arm64.whl
goblin_ai-2.1.1-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.1-cp311-cp311-macosx_10_9_x86_64.whl

Total release size: 44.0 MB

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

Download URL goblin_ai-2.1.1-cp314-cp314-win_amd64.whl
Size 2.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
d893d44b6ef50c9667a2f71d5b1e8ba748e51d0e6eaa40a7b74667ba15822f13
BLAKE2b-256 checksum
How to use checksums
a3ed799a36f7f352b0e04bdd260d7cdf21bd185d99ab479cf3fc190477c86697
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.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.1-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
11482e96e66de462b417c18a8273ff96e8e845068a143a396accc190de2ea615
BLAKE2b-256 checksum
How to use checksums
1f54fa379ed916b93a2cbadacf16903611547933824defd0b2f57e68fa283c3e
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.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.1-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
c66fbf08fb1c904fd2be3566e6df64a0d9708de6f3b92beb7161c7ae7bdd5fbd
BLAKE2b-256 checksum
How to use checksums
d4bf57e273515db4e4b4441387cb51d47f894c94404993e26e56a100a6894125
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.1-cp314-cp314-macosx_10_15_x86_64.whl

Download URL goblin_ai-2.1.1-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
f25d846f6e8a1bcb053f3c051463a726e19c02b0b5f977febed379d3ad2d4351
BLAKE2b-256 checksum
How to use checksums
5dc3babafe50bf20288e7f722aa2babbf1212863ac8c25bd3348ca0a08102fd3
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.1-cp313-cp313-win_amd64.whl

Download URL goblin_ai-2.1.1-cp313-cp313-win_amd64.whl
Size 2.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
82963fb32bf215ac4bc208067e4271e956ff7c47f1a027c60d0524f43f0bb7f2
BLAKE2b-256 checksum
How to use checksums
540156a5c5d18faf013328dd9acadd0b1ae890da98db3916cc866b4e823882ee
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.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.1-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
7203e2cc86f58f4c011ed69fac83407d2f28bc7439eaf9dbed98bcb06b519a00
BLAKE2b-256 checksum
How to use checksums
d92deb897983c181317cf9417ec91ef660c907a2ca34200a1dd0eda75a267a95
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.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.1-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
72da5fadc335a18b0fa57e92cbb4988f0728b066cc19f837cb26fe7eb397ace7
BLAKE2b-256 checksum
How to use checksums
53eaeef218d878ec88a7b40e4cb150ef0daa1f397a3fb582f67c5d9a6815bc75
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.1-cp313-cp313-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.1.1-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
b96cc6a3f8e590ab2103a9c4f2f9448aa5a00ffcfff7b936f8f543b845b6a953
BLAKE2b-256 checksum
How to use checksums
aa08443f4c343605c03ceaa8b9e2f378880d9f989788b95320570494b7864f98
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.1-cp312-cp312-win_amd64.whl

Download URL goblin_ai-2.1.1-cp312-cp312-win_amd64.whl
Size 2.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6403f82405e8bfdade4c94895517e00b16053e7382d2363dfa55b1f2adc20c4c
BLAKE2b-256 checksum
How to use checksums
4374f5266fc569b86281637005dd4b4f16c091dff1917c0e6802d08d3386c115
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.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.1-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
e8bbf11afd4981a3c3f99750e32029409da4a6cd036995b537a2d95f81077889
BLAKE2b-256 checksum
How to use checksums
8d6697edb8c3e0a5081f32cadc5cf5709d6b84d5b47c034af01825799786ddb1
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.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.1-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
6919cebb3fc7cf63b6e4f3783f10bdfed8fc162b77777c4a7d344cc08a069e1b
BLAKE2b-256 checksum
How to use checksums
b903c5bb38201142ab09ebb16422dc002b76cef5e8132f75e828a20b24d14516
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.1-cp312-cp312-macosx_10_13_x86_64.whl

Download URL goblin_ai-2.1.1-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
2009054e796a68947dd699bf3c48c273e03539a3ee3ce57a1a88b5fce79e5044
BLAKE2b-256 checksum
How to use checksums
5ad3fc5caeb29bcf16badaa4b00f176139723cdadbff0163a4d279afc431c1f0
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.1-cp311-cp311-win_amd64.whl

Download URL goblin_ai-2.1.1-cp311-cp311-win_amd64.whl
Size 2.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
555109df0959e16c6bcdc7af1558106c54286da5b2e475d2db3fb3102862c351
BLAKE2b-256 checksum
How to use checksums
fe3712107442468f0fd2ca16ef318c048bd7f9dd0ccb6c0e363915b3393a5ffc
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.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL goblin_ai-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 4.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dfa96bc058ef7dc2a243bf22e94759494a75881d651186e2c7d93a3e7d02154e
BLAKE2b-256 checksum
How to use checksums
820c7776dc4cf81cebb6fb664e73b973314c38836f60d7748dd98588f00f934a
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.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL goblin_ai-2.1.1-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
d2d0c988f52029248e4f549f5cf0285c4775ad0df6ccc7907618242a2b59728b
BLAKE2b-256 checksum
How to use checksums
0c2e9d0391cb6f4a05ea150629496fe70786e453941dda542bf67714a052475e
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.1-cp311-cp311-macosx_10_9_x86_64.whl

Download URL goblin_ai-2.1.1-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
b3628a4205463e27acb82c377d9189305bd9fdf52b1983cc49623b847fe310d2
BLAKE2b-256 checksum
How to use checksums
e5cc1aea123577ba88754edf15410e39523160b7440ff2a2469018970fcd8cbd
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.1

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