PHPackages                             labnocturne/image-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. labnocturne/image-client

ActiveLibrary[API Development](/categories/api)

labnocturne/image-client
========================

PHP client for Lab Nocturne Images API - Multi-language monorepo

10Python

Since Mar 20Pushed 1mo agoCompare

[ Source](https://github.com/jjenkins/agent-image-skills)[ Packagist](https://packagist.org/packages/labnocturne/image-client)[ RSS](/packages/labnocturne-image-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Lab Nocturne Images
===================

[](#lab-nocturne-images)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![API Status](https://camo.githubusercontent.com/01f0bb5cef558770c49a6c688fcc6c47a4796480cef3c8f02923dd27a8564232/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d4f6e6c696e652d73756363657373)](https://images.labnocturne.com)[![PRs Welcome](https://camo.githubusercontent.com/dd0b24c1e6776719edb2c273548a510d6490d8d25269a043dfabbd38419905da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667)](https://github.com/jjenkins/agent-image-skills/pulls)

Image storage for AI agents. Upload, retrieve, and manage images with a single curl call — no dashboards, no signup, no configuration.

```
# Get a test key (no signup required)
curl https://images.labnocturne.com/key

# Upload an image
curl -X POST https://images.labnocturne.com/upload \
  -H "Authorization: Bearer ln_test_abc123..." \
  -F "file=@photo.jpg"

# Returns: {"id":"img_xyz","url":"https://cdn.labnocturne.com/i/01jcd8x9k2n...jpg"}
```

The Problem
-----------

[](#the-problem)

Agents like Claude Code, ChatGPT, and custom AI workflows generate images all day — charts, screenshots, mockups, visual diffs. But where do they go?

- **Cloudinary** is $99/month after the free tier runs out
- **Imgur** fired all US staff and the service is degrading
- **ImageKit** is $89/month and built for marketers, not automation
- **Self-hosting** S3 requires AWS expertise and infrastructure management

AI agents don't need dashboards. They need an API that just works.

Why Lab Nocturne?
-----------------

[](#why-lab-nocturne)

Built for automation, not humans.

FeatureLab NocturneCloudinaryImgurImageKit**Test without signup**✅ Instant test keys❌ Email required⚠️ Sign-up flow❌ Email required**Ephemeral storage**✅ 7-day auto-cleanup❌ Pay for old files❌ No control❌ Manual deletion**Transparent pricing**✅ $9/mo → $29/mo⚠️ Free → $99/mo jump⚠️ Unstable⚠️ $89/mo → $249/mo**Agent-first design**✅ Claude Code skills❌ Dashboard-only❌ No API docs❌ Marketing tools**API reliability**✅ CloudFront CDN✅ Good⚠️ Degrading✅ Good**Webhook callbacks**🔜 Coming soon✅ Yes❌ No✅ YesWhy Agents Need Image Storage
-----------------------------

[](#why-agents-need-image-storage)

- **Memory and recall** — A user sends a screenshot to an agent on Discord and asks about it days later. Agents need persistent storage to hold visual context across conversations.
- **Sharing and collaboration** — An agent generates a chart, uploads it, and hands back a CDN URL. The user drops the link in Slack, a doc, or an email — no manual download/re-upload step.
- **Asset management** — Coding agents like Claude Code working on web projects need a place to host images during development: logos, screenshots, mockups.
- **Transient artifacts** — Test keys give agents 7-day ephemeral storage. Perfect for one-off visualizations, debug screenshots, or CI artifacts that don't need to live forever.

Agent Integrations
------------------

[](#agent-integrations)

### Claude Code (Built-in Skills)

[](#claude-code-built-in-skills)

Install all five skills with the MCP skills CLI:

```
npx skills add jjenkins/agent-image-skills
```

Available commands:

- `/upload` - Upload an image and get a CDN URL
- `/files` - List all uploaded images
- `/stats` - Check storage usage
- `/delete` - Remove an image
- `/generate-key` - Create a new test API key

Or clone the repo and the skills are available automatically when Claude Code runs from the project directory:

```
git clone https://github.com/jjenkins/agent-image-skills.git
cd agent-image-skills
# /upload, /files, /stats, /delete, /generate-key are now available
```

Set `LABNOCTURNE_API_KEY` in your environment to use a specific key, or leave it unset and the skills will auto-generate a test key.

### ChatGPT (GPT Action)

[](#chatgpt-gpt-action)

Add Lab Nocturne as a GPT Action using the OpenAPI schema in [`integrations/chatgpt-action/`](integrations/chatgpt-action/).

### Any Agent (curl)

[](#any-agent-curl)

One API call is all it takes:

```
curl -X POST https://images.labnocturne.com/upload \
  -H "Authorization: Bearer $LABNOCTURNE_API_KEY" \
  -F "file=@screenshot.png"
```

Quick Start Examples
--------------------

[](#quick-start-examples)

### Python

[](#python)

```
from labnocturne import LabNocturneClient

# Generate test API key (no signup required)
api_key = LabNocturneClient.generate_test_key()

# Create client and upload
client = LabNocturneClient(api_key)
result = client.upload('photo.jpg')
print(f"Image URL: {result['url']}")
# Output: https://cdn.labnocturne.com/i/01jcd8x9k2n...jpg
```

[Full Python Documentation →](python/README.md)

### Go

[](#go)

```
import "github.com/jjenkins/agent-image-skills/go/labnocturne"

// Generate test API key
apiKey, _ := labnocturne.GenerateTestKey()

// Create client and upload
client := labnocturne.NewClient(apiKey)
result, _ := client.Upload("photo.jpg")
fmt.Println("Image URL:", result.URL)
```

[Full Go Documentation →](go/README.md)

### Ruby

[](#ruby)

```
require 'labnocturne'

# Generate test API key
api_key = LabNocturne::Client.generate_test_key

# Create client and upload
client = LabNocturne::Client.new(api_key)
result = client.upload('photo.jpg')
puts "Image URL: #{result['url']}"
```

[Full Ruby Documentation →](ruby/README.md)

### JavaScript/Node.js

[](#javascriptnodejs)

```
import LabNocturneClient from 'labnocturne';

// Generate test API key
const apiKey = await LabNocturneClient.generateTestKey();

// Create client and upload
const client = new LabNocturneClient(apiKey);
const result = await client.upload('photo.jpg');
console.log('Image URL:', result.url);
```

[Full JavaScript Documentation →](javascript/README.md)

### PHP

[](#php)

```
use LabNocturne\LabNocturneClient;

// Generate test API key
$apiKey = LabNocturneClient::generateTestKey();

// Create client and upload
$client = new LabNocturneClient($apiKey);
$result = $client->upload('photo.jpg');
echo "Image URL: {$result['url']}\n";
```

[Full PHP Documentation →](php/README.md)

Installation
------------

[](#installation)

LanguageMethod**Python**`pip install git+https://github.com/jjenkins/agent-image-skills.git#subdirectory=python`**Go**`go get github.com/jjenkins/agent-image-skills/go/labnocturne`**Ruby**Add to Gemfile: `gem 'labnocturne', git: 'https://github.com/jjenkins/agent-image-skills', glob: 'ruby/*.gemspec'`**JavaScript**Clone repo, then `cd javascript && npm install && npm link`**PHP**`composer require labnocturne/image-client`API Overview
------------

[](#api-overview)

All client libraries implement the same core methods:

MethodDescription`generateTestKey()`Generate a test API key (static method, no auth required)`upload(filePath)`Upload an image file, returns CDN URL`listFiles(page, limit, sort)`List uploaded files with pagination`getStats()`Get usage statistics (file count, storage used)`deleteFile(imageId)`Delete an image (soft delete, 30-day recovery)How It Works
------------

[](#how-it-works)

### 1. Get a Test API Key

[](#1-get-a-test-api-key)

No signup required for testing:

```
curl https://images.labnocturne.com/key
```

Returns a test key with:

- 10MB file size limit
- 7-day file retention (auto-cleanup)
- Perfect for development and CI/CD

### 2. Upload an Image

[](#2-upload-an-image)

```
curl -X POST https://images.labnocturne.com/upload \
  -H "Authorization: Bearer ln_test_abc123..." \
  -F "file=@photo.jpg"
```

Returns:

```
{
  "id": "img_01jcd8x9k2n3p4q5r6s7t8u9v0",
  "url": "https://cdn.labnocturne.com/i/01jcd8x9k2n...jpg",
  "size": 245678,
  "uploaded_at": "2026-03-19T17:22:00Z"
}
```

### 3. Use Your Image

[](#3-use-your-image)

```

```

The URL is a CloudFront CDN URL - fast, global delivery with 99.9% uptime.

API Endpoints
-------------

[](#api-endpoints)

MethodEndpointDescriptionGET`/key`Generate a test API keyPOST`/upload`Upload an image fileGET`/i/:id`Retrieve an image (redirects to CDN)GET`/files`List your uploaded filesGET`/stats`Get usage statisticsDELETE`/i/:id`Delete an image (soft delete)Pricing
-------

[](#pricing)

TierPriceFile Size LimitStorageRetention**Test**Free10MB100MB7 days (auto-cleanup)**Starter**$9/mo100MB10GBPermanent**Pro**$29/mo100MB100GBPermanentNo surprise charges. No usage-based pricing. No bandwidth fees.

Key Features
------------

[](#key-features)

### Test Keys (`ln_test_*`)

[](#test-keys-ln_test_)

- Generate instantly without signup
- 10MB file size limit
- Files expire after 7 days
- Perfect for development and testing

### Live Keys (`ln_live_*`)

[](#live-keys-ln_live_)

- Require email + payment
- 100MB file size limit
- Files stored permanently
- Production-ready

Supported Image Formats
-----------------------

[](#supported-image-formats)

- JPEG (`.jpg`, `.jpeg`)
- PNG (`.png`)
- GIF (`.gif`)
- WebP (`.webp`)

Error Handling
--------------

[](#error-handling)

All APIs return JSON errors with helpful messages:

```
{
  "error": {
    "message": "File size exceeds limit for test keys (10MB)",
    "type": "file_too_large",
    "code": "file_size_exceeded"
  }
}
```

Common HTTP status codes:

- `200` - Success
- `400` - Bad request (invalid parameters)
- `401` - Unauthorized (invalid API key)
- `413` - File too large
- `500` - Server error

Language-Specific Documentation
-------------------------------

[](#language-specific-documentation)

Detailed documentation for each language:

- **[Python](python/README.md)** - Full Python client documentation with examples
- **[Go](go/README.md)** - Full Go client documentation with examples
- **[Ruby](ruby/README.md)** - Full Ruby client documentation with examples
- **[JavaScript/Node.js](javascript/README.md)** - Full JavaScript client documentation with examples
- **[PHP](php/README.md)** - Full PHP client documentation with examples
- **[curl](examples/curl/README.md)** - Command-line examples for testing

Roadmap
-------

[](#roadmap)

- Test keys with auto-cleanup
- Multi-language SDKs (Python, Go, Ruby, JS, PHP)
- Claude Code MCP skills
- ChatGPT GPT Action integration
- Webhook callbacks for upload completion
- Image transformations (resize, crop, optimize)
- Temporary URLs (signed, expiring links)
- Bulk upload API

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

MIT License - See [LICENSE](LICENSE) for details.

Links
-----

[](#links)

- **Website**:
- **API Documentation**:
- **GitHub Issues**:

Need Help?
----------

[](#need-help)

Check the language-specific README files for detailed examples and usage instructions, or open an issue on GitHub.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance58

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/16c77fb35e2ea21a4b26e692321e1648c74fadfbb9b57b34bc9ce275d5e34197?d=identicon)[labnocturne](/maintainers/labnocturne)

---

Top Contributors

[![jjenkins](https://avatars.githubusercontent.com/u/43448?v=4)](https://github.com/jjenkins "jjenkins (34 commits)")

---

Tags

ai-agentsai-toolsapiautomationcdnchatgptclaude-codeephemeralimage-hostingimage-storagemcp

### Embed Badge

![Health badge](/badges/labnocturne-image-client/health.svg)

```
[![Health](https://phpackages.com/badges/labnocturne-image-client/health.svg)](https://phpackages.com/packages/labnocturne-image-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
