acking-you/gpt2api_rs/gpt2api-image-request
Claude Code and agent skill by acking-you/gpt2api_rs
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install acking-you/gpt2api_rs/gpt2api-image-requestSKILL.md
GPT2API Image Request
Use when a user needs to request, poll, retrieve, or debug image generation through the public GPT2API service on ackingliu.top.
Contract
This skill is for downstream users who already have a GPT2API key. It is not an operator/admin workflow.
- Public API base:
https://ackingliu.top/api/gpt2api - Browser UI:
https://ackingliu.top/gpt2api/login - Auth:
Authorization: Bearer <GPT2API_KEY> - Default image model:
gpt-image-2 - Default image size:
1024x1024 - Image count
n: integer from1to4 - Size format:
WIDTHxHEIGHT; each side must be between256and4096
pixels. auto or an omitted size resolves to 1024x1024.
Do not use service-admin tokens for public requests. Do not use local 127.0.0.1 URLs unless explicitly debugging the service host.
Preflight
Set the key and base URL:
Verify the key:
List available models:
Generate One Image
Use the OpenAI-compatible image endpoint:
Decode the first returned image:
The response shape is OpenAI-compatible:
This endpoint waits for task completion and returns base64 image data. If the queue may be slow, use the asynchronous session workflow below instead.
Edit One Image
Use multipart form data:
Decode the image the same way:
Conversation-Aware Requests
The compatible endpoints keep a key-scoped API session automatically. To bind multiple calls into a specific remembered conversation, pass x-gpt2api-session-id.
Create a session:
Use the returned session id with direct generation:
For fully asynchronous UI-style requests, append a message to a session:
For asynchronous image edits in the same conversation, use multipart form data:
Then observe progress and retrieve artifacts:
For live task updates, connect to the SSE stream:
Compatibility Endpoints
Prefer /v1/images/generations and /v1/images/edits for direct image work. For clients that only support text-style OpenAI APIs, GPT2API also accepts image-shaped requests through:
POST /v1/chat/completions: setmodeltogpt-image-2or include
"modalities":["image"]. The response puts base64 data URLs in choices[0].message.content.
POST /v1/responses: include animage_generationtool throughtoolsor
tool_choice. The response puts base64 image data in output[].result.
These compatibility endpoints use the same Bearer key, size rules, queue, and usage ledger as the direct image endpoints.
Cost Notes
Generation credits are recorded on the key usage ledger.
- Direct image credit units are based on area:
ceil(width * height / (1024 * 1024)) per image.
1024x1024costs1unit per image.1536x1024or1024x1536costs2units per image.2048x2048costs4units per image.- Conversation-aware session requests may add context surcharge for prior text
and image context used by the same session.
Use the user credit page in the web UI for a user-facing view. Use admin usage logs only when acting as an operator.
Troubleshooting
401: missing or invalid Bearer key.403: key disabled or quota exhausted.400: bad JSON, bad multipart form, invalidn, invalidsize, or a
session id that does not belong to the key.
502: upstream image service rejected or failed the request.- Empty or invalid
b64_json: keepimage-response.jsonand inspect the full
error body before retrying.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gpt2api-image-request/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/acking-you/gpt2api_rs/gpt2api-image-request)