APIs (alphabetical)

browser.phpControl Chromium sessions, pages, forms, links, tabs, screenshots, maps, and saved logins
convert_video_mp4.phpConvert an uploaded browser video to iPhone-compatible MP4
decision.phpReturn a yes/no decision, a choice, or a score with confidence
email.phpSend plain-text email
ffmpeg_helper.phpInspect, convert, and thumbnail uploaded media with safe FFmpeg presets
html_gen.phpCreate and publish HTML/JavaScript tools using existing Promptbox APIs
image_gen_local.phpGenerate or edit images on a connected local GPU
image_gen_gemini.phpGenerate or edit images with Gemini using one or more references
llm.phpRecommended LLM API for text answers
llm_chatgpt.phpOpenAI text and image answers with selectable models; defaults to low reasoning
llm_gemini.phpUse only when native voice input is needed
memory.phpCreate and manage structured long-term memory. Stored data is publicly accessible.
music_gen.phpGenerate vocal or instrumental music and download completed audio
NAS APIList, upload, download, and organize files on private storage
notes.phpCreate, read, edit, list, complete, restore, and delete durable note files. Stored data is publicly accessible.
pdf_creator.phpCreate a PDF from finished text or a supported office document
places.phpSearch Google Places and retrieve addresses, ratings, websites, and reviews
publish.phpPublish HTML/ZIP apps with update tokens and renewable 30-day periods, plus documents and media
qr.phpCreate a downloadable QR card for a URL, email address, or Wi-Fi network
rate-limit.phpCheck and record rolling usage limits for a named program
steam.phpFetch Steam game reviews or community discussion search results
stock.phpFetch stock quotes, company profiles, and financial metrics
transcribe.phpTranscribe uploaded or base64 audio to plain text
transcript.phpRetrieve plain-text transcripts for public YouTube videos
transfer.phpUpload temporary files and retrieve them with transfer.promptbox.cn receipts
tts.phpConvert text to MP3 or WAV in ten languages with selectable voices
tts_local.phpGenerate and stream local speech with Fish or Ming
twitter.phpSearch Twitter/X, Facebook, and Reddit posts and comments
video_compress.phpCompress an MP4 into a smaller phone-friendly H.264/AAC file
web.phpSearch the live web and return a numeric value or concise text answer
web_read.phpRead a public URL or file, or answer search terms through web.php
youtube.phpSearch YouTube and get AI-synthesized answers from video transcripts

browser.php

Control JavaScript-enabled Chromium sessions through REST

Controls a JavaScript-enabled browser: open pages, read content, fill forms, click links, manage tabs, take screenshots, and reuse saved login profiles. Use mode=agent for guided actions with current control IDs. Requires a browser API key. Uses two CPU cores and a 110-thread ceiling within a 120-thread hosting allowance, reserving ten threads for other hosting work. Supports up to two concurrent sessions and four tabs per session when resources permit; idle sessions expire after about three minutes and operations have a 45-second deadline. File uploads/downloads and interactive human takeover are unavailable.

POST JSON with Authorization: Bearer YOUR_BROWSER_API_KEY. Set mode=agent, open a URL, and use the latest page_id and control IDs for each action. Give state-changing actions a unique request_id, inspect the returned page, and close the session when finished. If content is loading or controls are truncated, request one snapshot, using focus when needed. Human-verification pages require human help; inspect uncertain results before retrying.

https://promptbox.cn/api/browser.php  POST

POST https://promptbox.cn/api/browser.php with JSON and Authorization: Bearer <browser API key>. Request a key from admin@promptbox.cn.

Operation deadline: Each operation is limited to 45 seconds. An expired agent operation closes its sessions; do not reuse those IDs. Concurrent actions return HTTP 409. Inspect uncertain results before retrying a click or submission.

Agent interface: Set mode:"agent" to receive short IDs for visible fields, buttons, links, and select options. Use the current page_id and control IDs for each action because every response returns a fresh observation. Mutating actions require a unique request_id of 8–160 letters, digits, hyphens, or underscores.

{"mode":"agent","action":"open","url":"https://example.com","request_id":"unique-open-001"}
{"mode":"agent","action":"fill_form","page_id":"LATEST_PAGE_ID","fields":{"field-1":"10 Market Street","field-2":"San Francisco","field-3":"option-2","field-4":true},"request_id":"unique-fill-001"}
{"mode":"agent","action":"click","page_id":"NEW_PAGE_ID","target_id":"OBSERVED_BUTTON_ID","request_id":"unique-click-001"}

fill_form fills fields sequentially and does not submit. Select controls use returned option-N IDs; checkbox and radio values are booleans. Inspect applied and the returned page, then click the submit control using the new page_id. Use snapshot with focus when controls are truncated. Close the session when finished.

Example: If an open response lists field-1 as Street address, field-2 as a Drink select with option-2 labeled Jasmine milk tea, field-3 as a checkbox, and button-4 as Continue, fill and continue like this:

{"mode":"agent","action":"fill_form","page_id":"PAGE_A","fields":{"field-1":"10 Market Street","field-2":"option-2","field-3":true},"request_id":"order-fields-001"}
{"mode":"agent","action":"click","page_id":"PAGE_B","target_id":"button-4","request_id":"order-continue-001"}
{"mode":"agent","action":"close","session_id":"SESSION_A","request_id":"order-close-001"}

PAGE_B is the fresh page ID returned by fill_form. Read the page returned by click before deciding the next action.

Low-level interface: Omit mode and use Playwright locators, coordinates, tabs, or profiles directly.

{"action":"create","url":"https://example.com"}
{"action":"snapshot","session_id":"RETURNED_SESSION_ID"}
{"action":"fill","session_id":"RETURNED_SESSION_ID","label":"Search","value":"milk tea"}
{"action":"click","session_id":"RETURNED_SESSION_ID","role":"button","name":"Search"}
{"action":"close","session_id":"RETURNED_SESSION_ID"}

Use one of selector, role + name, label, or text for low-level actions. Optional tab_id chooses a tab; optional frame resolves a locator inside an iframe. Read the page after navigation or interaction and do not repeat an uncertain state-changing action before inspecting current state.

Maximum 2 sessions and 4 tabs per session. Idle sessions expire after 3 minutes of inactivity. Cleanup runs every minute, so actual closure occurs after approximately 3–4 idle minutes. Interaction timeouts accept 1–25,000 ms. Requests are limited to 100 KB and responses to 8 MB.

Capacity and recovery: Browser v2.3.1 runs on two allowed CPUs with one raster thread. Automatic startup uses a restricted local launcher to avoid inherited web-worker virtual-memory limits. Its thread ceiling is 110 within the verified account allowance of 120, leaving ten slots for other work; browser memory remains capped at 1.5 GiB. Opening a cold browser reserves 75 threads; adding a session to a warm browser or adding a tab reserves 20. These are admission estimates; complex pages can still exceed capacity. If capacity_full reports rejected:true, no action started; wait at least retry_after seconds before an intentional retry. A resource shutdown may close existing sessions; inspect saved observations and never replay an uncertain click or submission automatically.

Complete usage reference · OpenAPI contract

convert_video_mp4.php

Convert uploaded browser video to MP4

Converts an uploaded browser-recorded or other FFmpeg-readable video into an iPhone-compatible MP4 with H.264 video and AAC audio. It accepts uploads up to 600 MB, returns raw video/mp4 bytes, and has no Promptbox request quota.

Send a multipart POST request with the source file in the video field. On success, save or play the returned video/mp4 bytes.

POST https://www.promptbox.cn/api/convert_video_mp4.php
NameTypeDescription
videofilerequiredUploaded WebM or other ffmpeg-readable video, up to 600 MB.

Returns video/mp4 on success. Errors are returned as plain text. The helper has no Promptbox request quota.

decision.php

Yes/no decisions, choices, and scores

Returns a yes/no decision, one choice from supplied options, or a score on an ordered scale, based on your context and question. The JSON result contains only answer and probability. Choose this helper when you need a typed decision rather than a prose answer. It has no Promptbox request quota.

POST JSON with context, question, output_type, and any required options. Use noul for yes/no, choice for 2–255 options, or score for 2–255 ordered levels. Prefer 2–10 levels for native scoring; 11–255 levels return an approximate score calculated from choice probabilities. Scores are zero-based and may be fractional.

https://www.promptbox.cn/api/decision.php  GET POST

GET returns a compact usage description. POST makes one JEV decision.

NameTypeDescription
contextstring, object, or arrayrequiredThe state or information the model should evaluate. Alias: state.
questionstring, object, or arrayrequiredThe decision to make or structured instructions for making it.
output_typestringrequiredOne of noul, choice, or score. Alias: type.
optionsobject or arraydepends on typeFor noul, optionally map yes/no (or true/false) to descriptions. For choice, supply 2–255 strings or an object mapping option keys to descriptions. For score, supply an ordered array of 2–255 level descriptions from lowest to highest. Scores with 2–10 levels use TypeSafe's native score type; scores with 11–255 levels use the compatibility calculation described above.
TypeAnswerProbability
noul"yes" or "no".The probability of the returned side. JEV natively reports the probability of yes; the helper converts a no result to 1 - P(yes).
choiceThe selected option key.The upstream probability for that selected key. Other option probabilities are omitted.
scoreThe expected zero-based position on the ordered scale, which may be fractional. With 2–10 levels, this is TypeSafe's native score. With 11–255 levels, this is the probability-weighted mean of the choice indices.TypeSafe's native score confidence for 2–10 levels, or its choice confidence for 11–255 levels. Per-level probabilities and the upstream legend are omitted.
curl https://www.promptbox.cn/api/decision.php \
  -H 'Content-Type: application/json' \
  -d '{"context":"Payments have failed for three days.","question":"Is this urgent?","output_type":"noul"}'

curl https://www.promptbox.cn/api/decision.php \
  -H 'Content-Type: application/json' \
  -d '{"context":"Customer asks for a refund.","question":"Which team should handle this?","output_type":"choice","options":{"billing":"Payments and refunds","technical":"Bugs and outages","sales":"Pricing and upgrades"}}'

curl https://www.promptbox.cn/api/decision.php \
  -H 'Content-Type: application/json' \
  -d '{"context":"I have asked five times and nobody replied!","question":"How frustrated is the customer?","output_type":"score","options":["Calm","Frustrated","Very angry"]}'
{ "answer": "yes", "probability": 0.91 } // choice { "answer": "billing", "probability": 0.84 } // score; zero-based and possibly fractional { "answer": 1.34, "probability": 0.78 }

Returns application/json. For a 2–10-level score, answer is TypeSafe's native score and probability is its native score confidence. For an 11–255-level compatibility score, answer is the probability-weighted mean of the choice indices and probability is TypeSafe's choice confidence. Input errors use HTTP 400, 413, or 415; disallowed browser origins use 403; unsupported methods use 405; configuration or upstream failures use 502 or 503. There is no Promptbox request quota. Only the selected answer and its confidence are returned.

email.php

Send plain-text email

Sends a plain-text email immediately and returns a JSON delivery result. The sender is adam@promptbox.cn; a different valid sender value becomes the Reply-To address. Verify the recipient, subject, and body before calling.

Prefer POST with the recipient, subject, and message fields below. Check the JSON result before reporting success. An uncertain result may still have sent the message; verify before sending it again.

https://www.promptbox.cn/api/email.php  GET POST
NameTypeDescription
recipientstringrequiredDestination email address. Must be a valid email format.
subjectstringrequiredEmail subject line.
bodystringrequiredPlain-text body of the email.
senderstringoptionalPreferred From address (used as Reply-To if it differs from the server's SMTP address). Default: adam@promptbox.cn.
{ "sent": true } // or on failure: { "sent": false, "error": "Mailer error: ..." }
# Send via GET GET email.php?recipient=user@example.com&subject=Hello&body=This+is+a+test+message. # Send via POST JSON POST email.php Content-Type: application/json { "recipient": "user@example.com", "subject": "Meeting reminder", "body": "Don't forget our call at 3 PM today." }

ffmpeg_helper.php

Inspect, convert, and thumbnail audio or video

Inspects, converts, or creates a thumbnail from an uploaded audio or video file using safe FFmpeg presets. Conversion defaults to MP4 and also supports WebM, MP3, M4A, WAV, and GIF, with uploads up to 300 MB and durations up to 600 seconds. The helper returns metadata as JSON or raw media bytes and has no Promptbox request quota.

Send a multipart request with an action and the uploaded media file. Use info or probe for JSON metadata, convert for converted media bytes, or thumbnail for a JPEG image.

GET POST https://www.promptbox.cn/api/ffmpeg_helper.php
ActionMethodReturnsDescription
infoGET or POSTJSONReturns helper version, FFmpeg version, limits, and supported presets.
probePOSTJSONReturns FFprobe stream and format metadata for the uploaded media.
convertPOSTFile bytesConverts uploaded media with a safe preset: mp4, webm, mp3, m4a, wav, or gif.
thumbnailPOSTJPEGExtracts one video frame as a JPEG thumbnail.
NameTypeDescription
actionstringrequired*info, probe, convert, or thumbnail. Defaults to info for GET.
mediafilerequiredUploaded audio or video file, up to 300 MB. Aliases file, video, and audio are also accepted.
presetstringoptionalFor convert; one of mp4, webm, mp3, m4a, wav, or gif. Default: mp4.
startnumberoptionalStart time in seconds for conversion. Range: 0-600.
durationnumberoptionalMaximum converted duration in seconds. Range: 0-600.
widthnumberoptionalOutput width for video, GIF, or thumbnail. Keeps aspect ratio. Range: 64-3840.
qualitynumberoptionalVideo CRF quality for mp4 and webm. Lower is better/larger. Range: 18-35, default 23.
audio_bitratenumberoptionalAudio bitrate in kbps for compressed outputs. Range: 64-320, default 128.
timenumberoptionalFor thumbnail; frame time in seconds. Default: 1.
const form = new FormData();
form.append('action', 'convert');
form.append('preset', 'mp4');
form.append('width', '720');
form.append('media', fileInput.files[0]);

const response = await fetch('https://www.promptbox.cn/api/ffmpeg_helper.php', {
  method: 'POST',
  credentials: 'omit',
  body: form
});
if (!response.ok) throw new Error(await response.text());
const mp4Blob = await response.blob();

info and probe return JSON like { "success": true, ... }. convert returns the requested media bytes with the matching content type, and thumbnail returns image/jpeg. Errors return JSON { "success": false, "error": "...", "code": 400 } with an appropriate HTTP status. The helper has no Promptbox request quota. Browser origin restrictions described above still apply.

html_gen.php

Generate and publish a browser-based tool from a text prompt

Generates a self-contained HTML/CSS/JavaScript browser tool from a text description, publishes it on Promptbox, and returns its public URL. Choose it to create a new static tool; use publish.php to deploy an existing build. It does not create server-side code or new REST endpoints.

POST action=start with a prompt, save task_id, and check action=status later. Do not poll continuously or restart a pending job. When job.status is completed, open url; when it is failed, read job.error. Generated tools are public, so keep secrets out of the prompt.

https://promptbox.cn/api/html_gen.php GET POST
ActionMethodDescription
startPOSTStart an asynchronous generation job. Returns HTTP 202 and a task_id.
statusGET, POSTRetrieve a job by task_id. Check job.status to determine whether it is pending, completed, or failed.
generateGET, POSTRun generation synchronously. This can exceed HTTP or client timeouts, so start is recommended.
helpGET, POSTReturn API usage information. An empty GET request also returns help.
NameTypeRequiredDescription
actionstringoptionalstart, status, generate, or help. Use start for normal generation.
promptstringrequired for start/generateA description of the tool's purpose, inputs, expected outputs, workflow, and API preferences. Maximum 60,000 bytes. Alias: q.
task_idstringrequired for statusThe exact ID returned by start. Alias: job_id.

All responses use application/json. A successful start request returns HTTP 202 with success, pending, task_id, status, and status_url. A status request returns HTTP 200 when the task lookup succeeds; inspect job.status to determine the generation result. A completed job includes the published url. A failed job includes job.error and does not include a new published URL.

Invalid requests return HTTP 400, disallowed browser origins return 403, unknown or expired task IDs return 404, unsupported methods return 405, and rate limits return 429 with a Retry-After header.

POST https://promptbox.cn/api/html_gen.php Content-Type: application/json {"action":"start","prompt":"Build a public text summarizer. Let the user paste text, press Summarize, and copy the result. Use Promptbox llm.php."} # After allowing time for generation, use the task_id returned above: GET https://promptbox.cn/api/html_gen.php?action=status&task_id=htmlgen_app_0123456789abcdefabcd # When job.status is "completed", open the returned url.

image_gen_local.php

Generate and edit images on a connected local GPU

Generates one PNG with a model installed on a connected ComfyUI desktop. Pass just a prompt to generate a 3:4 portrait with z-image-turbo, GPU release enabled, and prompt revision off. Set aspect_ratio for another shape. Attach optional images to edit a source or use ordered references.

The supported model IDs are z-image-turbo, minimax-h3, pony-v6, wai-illustrious, and anima. Call models to check live availability and each model’s modes, controls, and size limits.

When available, Z-Image Turbo uses eight-step NVFP4 for text and eight-step Canny ControlNet for edit. For edit, supply a source image and describe the desired final image. The worker extracts edges automatically, so the request needs no mask. Set options.strength to control edge guidance in edit. Its default is 0.8 and its range is 0.05 to 1.

Call models for live availability and submit generate without credentials. Pass the full signed job_id to status or events, then download the result from image_url. To stop an image job, send POST action=cancel with the same job ID and watch for its terminal status. After receiving the complete PNG, send POST action=delivered to delete the stored image immediately. Keep the signed ID and image URL private because either can grant access to the job. Clients using Authorization: Bearer <private API token> can send that header with each request.

Set revise_prompt: true to revise the prompt with ChatGPT Lite before the job is queued. This sends the prompt and mode metadata to OpenAI. Attached images are used only for local generation. If revision is unavailable, the helper queues the original prompt.

When models reports gpu_controls: true, submit a generation with release_gpu: false to retain its model. To release it, send POST action=unload&id=JOB_ID with the ID of that generation. Use the new job ID from the HTTP 202 response to check status or events.

The worker releases retained weights before starting a render that uses a different model, including a switch between the two Z-Image Turbo modes.

https://www.promptbox.cn/api/image_gen_local.php GET POST
ActionMethodDescription
modelsGETReturns online, gpu_controls, defaults, and the current model inventory. defaults contains model, aspect_ratio, revise_prompt, and release_gpu. Each model has id, label, modes, default_size, max_size, max_references, negative_prompt, and options. Defaults are supplied for omitted options.
generatePOSTAccepts a JSON job request. Returns HTTP 202 with an opaque job_id and prompt_revision. The job ID is signed for requests without a bearer token.
statusGETReturns job state for query parameter id.
eventsGETStreams named job SSE messages with the status contract for query parameter id. A bounded connection may send end while a job is still running. Check status or reconnect if needed.
imageGETReturns the private PNG for query parameter id when the job is done.
cancelPOSTCancels the job for query parameter id and discards its result, if present. No request body is required. A running job reports cancelling until the desktop acknowledges the stop. Repeating the request returns the current status while the job record exists.
unloadPOSTRequests model unload and GPU memory release when the renderer is idle. Pass the generation ID in id. No body is required. Returns HTTP 202 and a new job ID, or HTTP 200 with status: "idle" when the supplied job has no retained model. A running render can return HTTP 409.
deliveredPOSTDeletes the stored PNG for query parameter id after successful receipt. No request body is required. Returns {"success":true} for completed jobs, including repeat confirmations while the job record exists.
loginPOSTFor older clients, accepts JSON {"code":"…"} and sets a 12-hour browser cookie for access to older jobs.
logoutPOSTClears the legacy browser cookie.
NameTypeDescription
modelstringoptionalID from models. Defaults to z-image-turbo. An unavailable model returns HTTP 422.
promptstringrequiredText prompt or editing instructions, 1–8,000 UTF-8 bytes.
modestringoptionaltext, edit, or reference. When omitted, a source or nonempty images selects edit, reference images alone select reference, and a prompt alone selects text. The model must advertise the selected mode.
imagesarray of stringsoptionalOrdered PNG, JPEG, or WebP inputs as base64 strings or image data URLs. The limit is 1,024 pixels on the longest side and 3 MB of base64 per image. In edit, the first image is the source and the rest are references. Use mode: "reference" to treat every image as a reference. Use this field by itself for images.
source_imagestringoptionalExplicit source for edit. Use the same encoding as images. May be combined with reference_images.
reference_imagesarray of stringsoptionalExplicit ordered references with the same encoding limits. The selected model allows up to max_references beyond any source. MiniMax uses tags such as <Picture 1>.
negative_promptstringoptionalUp to 4,000 UTF-8 bytes for models advertising negative prompt support.
aspect_ratiostringoptionalExact width-to-height ratio, for example 3:4, 16:9, or 21:9. The aliases portrait, square, and landscape map to 3:4, 1:1, and 4:3. With neither ratio nor dimensions supplied, defaults to 3:4. The helper chooses a size near the model’s default pixel area. A ratio that cannot fit the model’s size range in 64-pixel increments returns HTTP 422.
width, heightintegersoptionalOutput dimensions in multiples of 64 from 256 to max_size. With aspect_ratio, supply either dimension to set the scale or supply both as a matching pair. With pixel dimensions alone, a missing dimension uses the model’s default_size.
seedintegeroptional0 through 4,294,967,295. The server chooses a random seed when omitted.
revise_promptbooleanoptionalDefaults to false. Set to true to run text-only ChatGPT Lite prompt revision before queuing. Allow up to 25 additional seconds for the submission response.
release_gpubooleanoptionalDefaults to true with no retention field supplied. Set to false to keep the model loaded after a successful idle completion. Retention requires gpu_controls: true.
keep_loadedbooleanoptionalCompatibility field with the inverse meaning of release_gpu. keep_loaded: true requests retention. If both fields are supplied, their values must be opposite.
optionsobjectoptionalModel-specific numbers and booleans declared by models. Numeric options include bounds and suggested increments. The maximum request body is 12.5 MB.

The generation submission response includes prompt_revision. Its value is disabled when revision is off, applied when a revised prompt was queued, or fallback when the original prompt was queued after an unavailable or unusable revision.

Status requests return application/json with success, job_id, status, and expires_at in Unix seconds. Status values are queued, running, cancelling, done, and failed. A cancelled job ends in failed with error set to Image generation cancelled. A completed generation includes seed, gpu_retained: true while it holds the retained model, and an image_url until the PNG is deleted. An unload job completes without a seed or image. Results are served as image/png and expire one hour after rendering if delivery was not confirmed. The event endpoint returns text/event-stream.

Errors return { "success": false, "error": "…" } with HTTP 400 for invalid input, 401 for authorization, 403 for unsupported browser origins, 404 for an unknown or expired job, 409 while the desktop is busy or the image is not ready, 410 for a deleted PNG, 413 for oversized input, 422 for unsupported capabilities, 429 for rate limits, or 503 if the desktop is offline. Browser origins must be Promptbox HTTPS origins.

The desktop processes one image job at a time. Jobs submitted here count toward the shared image_gen_local rate limit. The worker removes its local input, output, and ComfyUI history after rendering and requests GPU memory release when ComfyUI is idle, unless a successful generation requested model retention. Prompt and source data are relayed through private storage and cleared when the desktop claims the job.

curl "https://www.promptbox.cn/api/image_gen_local.php?action=models"

curl -H "Content-Type: application/json" \
  --data '{"prompt":"A yellow ceramic mug on a linen table"}' \
  "https://www.promptbox.cn/api/image_gen_local.php?action=generate"

curl -H "Content-Type: application/json" \
  --data '{"prompt":"A lighthouse seen from the shore at dawn","aspect_ratio":"16:9"}' \
  "https://www.promptbox.cn/api/image_gen_local.php?action=generate"

curl -H "Content-Type: application/json" \
  --data '{"model":"anima","mode":"text","prompt":"Illustration of a lighthouse in a storm"}' \
  "https://www.promptbox.cn/api/image_gen_local.php?action=generate"

curl -H "Content-Type: application/json" \
  --data-binary @edit-request.json \
  "https://www.promptbox.cn/api/image_gen_local.php?action=generate"

# edit-request.json
{"prompt":"A mustard-yellow cotton shirt","images":["BASE64_SOURCE_IMAGE"],"revise_prompt":true,"release_gpu":false}

curl -N "https://www.promptbox.cn/api/image_gen_local.php?action=events&id=$JOB_ID"

curl -X POST "https://www.promptbox.cn/api/image_gen_local.php?action=cancel&id=$JOB_ID"

curl -f -o image.png "https://www.promptbox.cn$IMAGE_URL" && \
  curl -X POST "https://www.promptbox.cn/api/image_gen_local.php?action=delivered&id=$JOB_ID"

image_gen_gemini.php

Gemini image generation and editing with up to 14 references

Generates one 1K image from a prompt and up to 14 ordered reference images. Use aspect_ratio to request a specific shape, such as 9:16 portrait. The default is 3:4 portrait.

Send prompt by GET or POST. For editing, POST one reference as image, or send a JSON images array of data URIs in the order described in the prompt. With multiple references, pass model=gemini-3.1-flash-lite-image to use Lite. Save or display the returned image bytes.

https://www.promptbox.cn/api/image_gen_gemini.php  GET POST
NameTypeDescription
client_idUUID stringoptionalPersistent random installation UUID for usage analysis. Logged as client_id; omitted or invalid values are logged as null. Does not change shared program quotas and is not sent to Google.
promptstringrequiredText prompt describing the image to generate (or the edit to apply to an input image). Also accepted as q.
landscapebooloptionalPass 1 or true for landscape (4:3). Default is portrait (3:4). Applies when aspect_ratio is omitted.
aspect_ratiostringoptionalOutput shape. Choose 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, or 21:9. Overrides landscape.
modelstringoptionalUse gemini-3.1-flash-image for Nano Banana 2 or gemini-3.1-flash-lite-image for Nano Banana 2 Lite. Both options accept ordered reference images. If omitted, the helper selects Lite for zero or one reference and Nano Banana 2 for two or more.
image_sizestringoptionalBoth models produce 1K output through this helper. The legacy value 4K and its aliases (imageSize=4K, four_k=1, 4k=1, image_4k=1, and use_4k=1) remain accepted for compatibility but are ignored.
imagestring or fileoptionalSingle input image for editing or style transfer. Accepted as a base64 string (plain or data URI), a JSON object with inlineData.data, or a multipart file upload. Supported formats include PNG, JPEG, WebP, HEIC and HEIF. Max 20 MiB.
imagesarray of stringsoptionalOrdered list of 1 to 14 base64 image data URIs. Supports the same formats as image. Encoded data URIs may total up to 18 MiB. This list takes precedence over single-image fields and uploads.
image_mime_typestringoptionalMIME type of the input image when passing plain base64 without a data URI. E.g. image/png.

HTTP 200 with the detected MIME type (image/png, image/jpeg, etc.) and raw image bytes. On error: plain text message with appropriate HTTP status code.

# Text-to-image (landscape) GET image_gen_gemini.php?prompt=Watercolor+painting+of+a+mountain+lake&landscape=1&model=gemini-3.1-flash-image # Display the returned image (browser origin restrictions still apply) img.src = 'https://www.promptbox.cn/api/image_gen_gemini.php?prompt=' + encodeURIComponent(prompt); # Image editing via POST POST image_gen_gemini.php Content-Type: application/json { "prompt": "Make this photo look like a Van Gogh painting", "image": "data:image/jpeg;base64,/9j/4AAQ..." } # Multi-reference editing with Lite and portrait output POST image_gen_gemini.php Content-Type: application/json { "prompt": "Keep the scene from image 1 and use the lamp design from image 2.", "images": ["data:image/jpeg;base64,...", "data:image/png;base64,..."], "model": "gemini-3.1-flash-lite-image", "aspect_ratio": "9:16" }

llm.php

Preferred helper for ordinary text requests

Preferred LLM helper for ordinary text requests. Answers questions, summarizes, translates, and generates text. The default is glm-5.3 with low reasoning effort. Select model=fast for local Qwen3.6-35B-A3B. Failed GLM requests, including upstream quota errors, fall back once to local Qwen. Select model=pro for deepseek/deepseek-v4-flash. Use a multimodal helper for images, audio, or files. Optional POST streaming emits final-answer text incrementally.

Send prompt by GET or POST and read the answer as plain text. For Fast, add model=fast and optionally set reasoning=true to enable Qwen thinking for that request. For OpenAI-compatible chat, send return_provider_response=true with provider_payload.messages. To stream a plain prompt, POST stream:true and read newline-delimited JSON events from response.body.getReader().

https://www.promptbox.cn/api/llm.php  GET POST
NameTypeDescription
streambooleanoptionalDefault false. POST prompt mode only. True returns application/x-ndjson with {type:"delta",text} records and a final {type:"done",model}. A late failure returns {type:"error",error} with no done record. Require done before treating the response as complete. JSONP and return_provider_response cannot be combined with streaming. GLM falls back only before any answer delta has been emitted; a partially emitted answer is never replaced.
promptstringrequiredThe task or question to send to the selected LLM. Also accepted as q.
max_sentencesintegeroptionalCaps the response length. Default: 0 (no cap).
max_tokensintegeroptionalMaximum output tokens for a plain prompt. The cap is clamped from 128 to 32768, with a ceiling of 8192 for local Qwen. Omit this field to use the provider default, which is 8192 for Fast. Allow room for both thinking and the answer when reasoning is enabled.
modelstringoptionalDefault is Z.ai glm-5.3. Omitting the field, using lite, or supplying an unrecognized value keeps GLM. Pass pro, premium, or advanced for deepseek/deepseek-v4-flash with low reasoning effort. Pass fast or qwen3.6-35b-a3b for local Qwen. Legacy selectors mercury, mercury-3, and inception/mercury-3 also select Fast. Model field aliases are mode, tier, variant, quality, and setting. Explicit Pro boolean flags take precedence.
timeout_secondsintegeroptionalProvider timeout from 5 to 180 seconds, with a 90-second default. Plain non-streaming GLM requests cap at 90 seconds. A failed GLM request gets one separate 45-second Qwen fallback. In streaming mode, fallback is available until the first answer delta.
reasoningbooleanoptionalUse true or 1 for high effort. Use false, 0, or omit the flag for low effort. Accepted for plain and structured requests. Top-level reasoning_effort takes precedence, followed by provider_payload.reasoning_effort, then this flag. Invalid values return HTTP 400.
reasoning_effortstringoptionalGLM accepts low (default), high, and max. Its medium alias maps to high. In Fast, instant and low disable thinking, while medium, high, and max enable it. The Qwen fallback applies the same mapping to the requested effort. Pro uses low effort. Invalid values return HTTP 400.
thinkingstringoptionalLegacy compatibility field. Use reasoning or reasoning_effort to control thinking.
qualitystringoptionalAlias for model selection. Use quality=pro to use AIMLAPI deepseek/deepseek-v4-flash.
probooleanoptionalSet to 1, true, or yes to use AIMLAPI deepseek/deepseek-v4-flash. Aliases: use_pro, deepseek_pro.
response_formatstring or objectoptionalUse json_object or {"type":"json_object"} to request JSON answer text. Ask for JSON in the prompt.
return_provider_responsebooleanoptionalWith provider_payload, returns the complete non-streaming chat response as JSON. The helper enforces the selected model and forwards messages, tools, tool_choice, and structured response formats. Qwen accepts max_tokens or max_completion_tokens up to 8192. GLM fallback preserves the messages, tools, and response schema.
provider_payloadobjectoptionalOpenAI-compatible chat request with messages and optional tools or response_format. Used with return_provider_response=true and the top-level model selector.
callbackstringoptionalGET-only JSONP callback name. Browser origin restrictions still apply. Alias: cb.

Plain-text responses identify the answering model in X-LLM-Model. Supported values are qwen3.6-35b-a3b, deepseek-v4-flash, and glm-5.3. Structured responses and the final streaming event identify the model in model. Streaming emits final-answer text only. GET JSONP returns { ok, text, model } or { ok: false, error, status }.

The shared llm request limit applies when generation uses local Qwen, including GLM fallback attempts. Fast returns HTTP 429 with Retry-After when the limit is reached. JSONP reports the status in its error object and streaming reports the limit in an error event. The cloud routes have upstream limits.

# Translate a sentence GET llm.php?prompt=Translate+"Hello, how are you?" to Spanish # Classify sentiment GET llm.php?q=Is+this+positive+or+negative%3F+"The+food+was+cold+and+service+was+rude." # Use local Qwen GET llm.php?prompt=Reply+with+Hello&setting=fast # Enable Qwen thinking for one request GET llm.php?prompt=Reply+with+Hello&model=fast&reasoning_effort=high # Use high thinking with structured messages POST llm.php Content-Type: application/json {"model":"fast","reasoning_effort":"high","return_provider_response":true,"provider_payload":{"messages":[{"role":"user","content":"Reply with Hello"}]}} # Request deeper reasoning without changing the default model POST llm.php Content-Type: application/json {"prompt":"Return a JSON plan for the supplied constraints.","reasoning":true,"max_tokens":16384,"response_format":"json_object"} # Use the DeepSeek V4 Flash pro model GET llm.php?prompt=Explain+quantum+tunneling&model=pro # Alternate selector for DeepSeek V4 Flash GET llm.php?prompt=Explain+quantum+tunneling&pro=1 # In browser JavaScript const answer = await fetch('https://www.promptbox.cn/api/llm.php?prompt=' + encodeURIComponent(prompt), { credentials: 'omit' }).then(r => r.text()); # JSONP response wrapper (browser origin restrictions still apply) window.handleLlm = (payload) => console.log(payload.ok ? payload.text : payload.error); const script = document.createElement('script'); script.src = 'https://www.promptbox.cn/api/llm.php?callback=handleLlm&prompt=' + encodeURIComponent(prompt); document.head.appendChild(script);

llm_chatgpt.php

OpenAI text and image answers with selectable models

Returns a plain-text answer with selectable OpenAI models and optional image input. Choose it when you specifically need an OpenAI model; use llm.php for ordinary text requests. Defaults to gpt-6.2-sol with low reasoning and the Promptbox request-count limit. The lite route uses gpt-6-luna and is exempt from that limit.

Send prompt by GET or POST and read the answer as plain text. POST JSON when supplying images or a reusable system_prompt. Keep system_prompt identical across related requests to let OpenAI cache eligible instructions. Send changing questions, timestamps and context in prompt. Set model=lite for Luna or another supported model name when needed. The helper uses OpenAI Fast by default. Set service_tier=default for standard OpenAI processing. Use reasoning_effort to override the model default and max_tokens up to 32768 to allow room for reasoning and the answer.

For chat messages and native tools, POST JSON with model=lite, return_provider_response=true, and provider_payload.messages. Put optional tools, tool_choice, parallel_tool_calls, response_format or max_tokens inside provider_payload. Add top-level stream=true for incremental content and tool arguments.

https://www.promptbox.cn/api/llm_chatgpt.php  GET POST
NameTypeDescription
promptstringoptionalThe task or question, required in plain-text mode. Alias: q.
system_promptstringoptionalReusable instructions for a plain-prompt POST, with or without streaming. Passed as a developer message before the user prompt. Use with prompt. For structured requests, supply instructions inside provider_payload.messages.
modelstringoptionalDefault: gpt-6.2-sol with low reasoning. Pass another model name to select that model. lite and gpt-6-luna explicitly select the Luna lite route, which defaults to low reasoning effort and has no Promptbox request-count limit.
service_tierstringoptionalUse fast for OpenAI Fast or default for standard OpenAI processing. Omission selects fast. This setting applies to plain-text, streamed, and structured requests.
reasoning_effortstringoptionalAccepted values: none, minimal, low, medium, high, xhigh, or max. Defaults to low when model is omitted, and low for the explicit Luna lite route. Other explicit models use the provider default unless this field is set.
max_tokensintegeroptionalMaximum output tokens, clamped from 128 to 32768. Allow room for reasoning and the final answer; for short structured decisions, 16384 leaves headroom. Omit to use the provider default.
imagesarrayoptionalImages to include with the prompt. POST JSON accepts HTTP(S) image URLs or base64 strings/data URIs for JPEG, PNG, and WebP images.
provider_payloadobjectoptionalStructured Lite POST with a nonempty messages array. Omit top-level prompt and images.
return_provider_responsebooleanoptionalSet true with provider_payload.
streambooleanoptionalSet true for newline-delimited JSON. Defaults to false.
callbackstringoptionalGET-only JSONP callback name. Alias: cb. JSONP returns a JavaScript wrapper containing { ok, text } or { ok: false, error, status }.

Successful non-JSONP requests return the model answer as text/plain. Input errors return an HTTP error status and a plain-text message. Upstream or empty-response failures return an HTTP error status and null.

Buffered structured requests return the provider completion as JSON. Streamed structured requests return application/x-ndjson with {"type":"delta","delta":{...}} records containing content, refusal, or native tool-call fragments, and a terminal {"type":"done","finish_reason":"stop"} (or tool_calls or another provider finish reason). Accumulate tool arguments by call index and execute only after a complete tool_calls finish, validating the complete batch first. An error event or missing completion means the result is incomplete. Plain-prompt streaming retains its existing delta.text and done records.

# Default: GPT-6.2 Sol with low reasoning GET llm_chatgpt.php?prompt=Explain+quantum+tunneling # Select the lite route, which defaults to low reasoning effort GET llm_chatgpt.php?prompt=Summarize+this&model=lite # Select the lite route with standard OpenAI processing GET llm_chatgpt.php?prompt=Summarize+this&model=lite&service_tier=default # Set reasoning explicitly POST llm_chatgpt.php Content-Type: application/json { "prompt": "Compare these options carefully.", "reasoning_effort": "high" } # Include an image POST llm_chatgpt.php Content-Type: application/json { "prompt": "Describe this picture.", "images": ["data:image/jpeg;base64,/9j/4AAQ..."] }
POST llm_chatgpt.php
Content-Type: application/json
{"model":"lite","system_prompt":"Answer clearly in one sentence.","prompt":"Explain why the Moon has phases.","stream":true}
POST llm_chatgpt.php
Content-Type: application/json
{"model":"lite","stream":true,"reasoning_effort":"none","return_provider_response":true,"provider_payload":{"messages":[{"role":"user","content":"Say hello."}]}}

llm_gemini.php

Gemini answers for native voice/audio input

Returns a plain-text Gemini answer from text, images, audio, files, or structured Gemini content. Choose this helper when native voice/audio input is needed. Use llm.php for ordinary text. Defaults to gemini-3-flash-preview without specifying thinking effort; Gemini uses its own default when no thinking controls are supplied. The standard route allows 300 requests per rolling day; model=lite selects gemini-3.1-flash-lite and is exempt from that limit.

POST the prompt and audio as Gemini parts or contents, then read the answer as plain text. Set model=lite for the lightweight model. Use the fields below for images, conversation history, system instructions, or generation settings.

https://www.promptbox.cn/api/llm_gemini.php  GET POST
NameTypeDescription
promptstringrequired*The task or question. Also accepted as q. Required unless parts or contents is supplied.
modelstringoptionalDefault: gemini-3-flash-preview. Use lite or gemini-3.1-flash-lite for the lite model; any other non-empty Gemini model name is passed through unchanged.
imagesarrayoptionalArray of base64 image strings (plain base64 or data URI format: data:image/jpeg;base64,...). Supported types: JPEG, PNG, WEBP. Only accepted via POST with JSON body. HTTP URLs are rejected.
partsarrayoptionalRaw Gemini-style parts. Supports { "text": "..." } and { "inlineData": { "mimeType": "...", "data": "base64..." } }. If prompt is also supplied, it is prepended.
contentsarrayoptionalRaw Gemini-style conversation contents. Each item may include role as user or model and a parts array.
languagestringoptionalWhen supplied, appends Give your response in <language> language. to the Gemini request. Alias: lang. Blank values are ignored.
system_promptstringoptionalSystem instruction for Gemini. Alias: system. A Gemini-style systemInstruction.parts object is also accepted.
generationConfigobjectoptionalGemini generation settings such as temperature or maxOutputTokens. Alias: generation_config. The helper does not automatically add thinkingConfig, thinkingLevel, or thinkingBudget. Gemini uses its own default when these are omitted; caller-supplied thinking settings pass through unchanged. The same rule applies to provider-response mode (return_provider_response=true with provider_payload); explicit model names and lite remain supported.
callbackstringoptionalGET-only JSONP callback name for sites where external fetch() is blocked. Alias: cb.

text/plain with the model's answer. Returns null (the literal string) on API-level errors, or an HTTP error code on input validation failures. In JSONP mode, the response is always JavaScript with { ok, text } or { ok: false, error, status }.

# Use when the request includes native audio/voice input POST llm_gemini.php Content-Type: application/json { "prompt": "Answer the spoken question.", "parts": [{ "inlineData": { "mimeType": "audio/wav", "data": "BASE64_AUDIO_DATA" } }] }

memory.php

Create and manage structured long-term memory

Creates and manages persistent structured memory for preferences, project context, knowledge, and tasks. Supports section-specific additions, exact item edits, consolidation, and semantic forgetting. Memory files are publicly accessible and limited to 400,000 bytes; do not store secrets, confidential material, or sensitive personal information.

Send an action and memory_id with the fields required by that action. Save the memory ID for later calls. Use include_ids=true to retrieve item IDs for exact edits; use forget with item_id to remove one item and purge to delete the entire memory. Mutating actions require POST.

https://www.promptbox.cn/api/memory.php  GET POST
NameTypeDescription
actionstringoptionalDefault: get. Supported values: create, add, forget, update, get, and purge. Aliases: new, output, full, delete, and clear. Mutating actions require POST. The legacy delete alias still means purge the complete memory file; use forget plus item_id to remove one item.
memory_idstringrequired except generated createSafe memory identifier. Letters, numbers, dots, underscores, and hyphens are kept; other characters become hyphens. Aliases: id, name.
titlestringoptionalHuman-readable title for a new memory file. If memory_id is omitted on create, the title/name is slugged into the memory ID or a random ID is generated.
textstringrequired for add/updateMemory text. With add plus section, the exact text is stored directly. With legacy add and no section, it is merged by GLM. With update, it replaces the identified item's text. Aliases for add include memory, content, add, entry, and new_memory.
sectionstringoptionalWhen supplied with add, selects one of the eight structured sections and enables the fast direct-add path. The summary is cleared after direct edits so it cannot contradict the complete sections.
item_idstringrequired for update/direct forgetStable item ID returned by get with include_ids=1. Use update plus text to edit that item, or forget plus this ID to delete it exactly. Alias: itemId.
forgetstringrequired for semantic forgetFact, preference, topic, or instruction for GLM to remove when item_id is omitted. Aliases: forget_text, text, content, and query.
include_idsbooleanoptionalFor get, include a flat items array containing each stable id, section, text, and timestamps. Default false, preserving the legacy response exactly. Alias: includeIds.
overwritebooleanoptionalFor create, set to 1 to replace an existing memory file with the same ID.
callbackstringoptionalGET-only JSONP callback name for sites where external fetch() is blocked. Alias: cb.
{ "success": true, "action": "add", "memory_id": "agent-main", "memory": { "summary": "...", "sections": { "preferences": ["..."] } } }

Create, add, forget, and get return the complete normalized memory JSON for easy review. Purge returns { "success": true, "purged": true }. Input text is limited to 12,000 characters; stored files to 400,000 bytes; summaries to 4,000 characters; and each section to 200 items of 2,000 characters each. JSON requests must contain a valid object. On error: { "success": false, "error": "...", "code": 400 } or another relevant HTTP status.

# Create a new memory file POST memory.php Content-Type: application/json { "action": "create", "memory_id": "agent-main", "title": "Main Agent Memory" } # Add a memory POST memory.php Content-Type: application/json { "action": "add", "memory_id": "agent-main", "text": "The user prefers compact mobile screens with secondary options hidden in settings." } # Fast direct add (no LLM call) POST memory.php Content-Type: application/json { "action": "add", "memory_id": "agent-main", "section": "preferences", "text": "The user prefers compact mobile screens." } # Read memory with stable item IDs GET memory.php?action=get&memory_id=agent-main&include_ids=1 # Update one exact item POST memory.php Content-Type: application/json { "action": "update", "memory_id": "agent-main", "item_id": "mem_0123456789abcdef", "text": "The user prefers compact, phone-first screens." } # Delete one exact item POST memory.php Content-Type: application/json { "action": "forget", "memory_id": "agent-main", "item_id": "mem_0123456789abcdef" } # Forget a memory POST memory.php Content-Type: application/json { "action": "forget", "memory_id": "agent-main", "forget": "old preference for beige color palettes" } # Full memory output GET memory.php?action=get&memory_id=agent-main # Purge a complete memory file POST memory.php Content-Type: application/json { "action": "purge", "memory_id": "agent-main" }

music_gen.php

Generate vocal or instrumental music

Creates vocal songs from a prompt and lyrics, or instrumental music, and returns a job ID for later status checks and audio download. Supports MP3 and WAV. Prompts must contain 10–2,000 characters; vocal lyrics must contain 10–3,000 characters.

POST a prompt and lyrics for a vocal track, or set is_instrumental for an instrumental. Save the generation ID, check status later with GET, and request action=audio when complete. Do not poll continuously.

https://www.promptbox.cn/api/music_gen.php  GET POST
prompt: minimum 10 characters, maximum 2000 characters lyrics: minimum 10 characters, maximum 3000 characters unless is_instrumental is true
NameTypeDescription
actionstringoptionalgenerate to create a job, status to check one, or audio to stream a completed song from the server. Aliases: create, start, check, check_status, retrieve, download, stream. POST defaults to generate; requests with generation_id default to status.
promptstringrequired for generateMusic style, mood, arrangement, or scenario. AIMLAPI requires 10-2000 characters. Alias: style.
lyricsstringrequired for vocal generateSong lyrics. AIMLAPI requires 10-3000 characters for vocal music. Structure tags like [Verse], [Chorus], and [Bridge] are supported. When is_instrumental is true, this can be omitted and the helper sends a minimal non-lyrical structure.
is_instrumentalbooleanoptionalWhen true, asks the provider for instrumental/no-vocal output and allows lyrics to be omitted. Alias: instrumental.
generation_idstringrequired for statusThe id returned by a generate request. Alias: id.
audio_settingobjectoptionalOptional JSON object passed to AIMLAPI. Supported fields are sample_rate, bitrate, and format.
sample_rateintegeroptionalShortcut for audio_setting.sample_rate. Must be 8000-48000.
bitrateintegeroptionalShortcut for audio_setting.bitrate. Must be 16000-320000.
formatstringoptionalShortcut for audio_setting.format. Allowed values: mp3 or wav.
callbackstringoptionalJSONP callback for GET status checks. Alias: cb. JSONP is not available for POST.
{ "id": "60ac7c34-3224-4b14-8e7d-0aa0db708325", "status": "queued" }
{ "id": "60ac7c34-3224-4b14-8e7d-0aa0db708325", "status": "completed", "audio_file": { "url": "https://cdn.aimlapi.com/..." }, "meta": { "usage": { "credits_used": 120000 } } }

On validation, rate-limit, or upstream API errors, returns JSON like { "success": false, "error": "..." } with an appropriate HTTP status code. Rate-limit denials also set Retry-After when available.

# Create a generation job POST music_gen.php Content-Type: application/json { "prompt": "Lo-fi pop with warm bass, soft drums, and a bright chorus", "lyrics": "[Verse]\nCity lights are waking\n[Chorus]\nWe rise into the morning", "format": "mp3" } # Create an instrumental generation job POST music_gen.php Content-Type: application/json { "prompt": "Instrumental-only cinematic score, tense opening, hopeful payoff, piano and strings, no vocals", "is_instrumental": true, "format": "mp3" } # Check status GET music_gen.php?generation_id=60ac7c34-3224-4b14-8e7d-0aa0db708325 # Stream completed audio through Promptbox GET music_gen.php?action=audio&generation_id=60ac7c34-3224-4b14-8e7d-0aa0db708325 # Browser create request const job = await fetch('https://www.promptbox.cn/api/music_gen.php', { method: 'POST', credentials: 'omit', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ prompt, lyrics, format: 'mp3' }) }).then(r => r.json()); # JSONP status check for restricted pages script.src = 'https://www.promptbox.cn/api/music_gen.php?callback=handleMusic&generation_id=' + encodeURIComponent(job.id);

NAS API

Authenticated access to private file storage

Lists folders, reports storage capacity, streams downloads, uploads files in chunks, and manages folders, descriptions, and Trash. Access requires the NAS credential.

Send the NAS password from your secret store as JSON to POST https://promptbox.cn/api/nas.php?op=api_login. Save the returned access_token privately and send Authorization: Bearer <access_token> on each following request. Reuse the token for up to 24 hours. api_logout revokes it, and changing the NAS password revokes all API tokens. Use an HTTPS client or server-side integration. For browser requests, use the matching HTTPS origin on promptbox.cn or www.promptbox.cn.

https://promptbox.cn/api/nas.php  GET POST PUT
NameTypeUseDescription
opstringrequiredPick an operation from the table below.
pathstringrequired for downloadURL-encode the path relative to the NAS root. For list, omit it or use an empty string to list the root.
idstringrequired for upload_chunkUpload ID returned by upload_begin.
offsetintegerrequired for upload_chunkZero-based byte offset. Start at 0 and use the previous chunk’s received value for the next request.
OperationMethodRequest and result
api_loginPOSTJSON {"password": string}. Returns ok, access_token, token_type (Bearer), and expires_in (86400 seconds).
api_logoutPOSTSend the bearer token with an empty request body. Revokes that token and returns {"ok":true}.
listGETOptional query path. Returns path and items. Each item includes name, path, folder, size in bytes, modified as Unix seconds, and description. Description status is pending, processing, ready, limited, edited, changed, or error. Failures appear in reader.error; a scheduled retry includes reader.retry_at.
statusGETReturns storage status including free and total bytes.
downloadGETQuery path. Streams file bytes with Content-Disposition. Supports single byte ranges using the Range header and HTTP 206.
mkdirPOSTJSON {"path": string, "name": string}. Creates a folder under path. Use "" for the root.
renamePOSTJSON {"path": string, "name": string}. Renames a file or folder within its current parent.
trashPOSTJSON {"path": string}. Moves the file or folder and its contents to Trash.
trash_listGETReturns items with id, the original path, and created as Unix seconds.
restorePOSTJSON {"id": string}. Restores a Trash entry using its ID from trash_list.
descriptionPOSTJSON {"path": string, "description": string}. Saves a file description of up to 5,000 characters.
describePOSTJSON {"path": string}. Queues background generation and returns HTTP 202 with ok:true, queued:true, and the current file immediately. Existing pending jobs are deduplicated. Use this to retry a failed description or regenerate one; completion does not depend on keeping the caller connected. Supported files up to 10 MB may be sent to the reader for temporary processing. Larger files can use an excerpt or metadata.
upload_beginPOSTJSON {"path": string, "name": string, "size": integer}. Pass the destination folder and exact file size in bytes. Returns an upload id for staging.
upload_chunkPUTQuery id and offset. Send raw bytes as application/octet-stream with an explicit Content-Length between 1 and 8,388,608 bytes. Returns total staged bytes as received. Send chunks sequentially.
upload_finishPOSTJSON {"id": string}. Saves the complete file, atomically queues its background description, and returns file immediately without waiting for file-reading or language services. Existing files are protected from overwrite. For an empty file, go directly from upload_begin to upload_finish. Descriptions run automatically, including API uploads, and unfinished jobs resume after a service restart. Refresh the folder with list later to see the result; do not poll continuously. Temporary failures have up to three total attempts before a visible error status. Description failures never remove the saved file.
upload_cancelPOSTJSON {"id": string}. Discards the staged upload. If a chunk's result is uncertain and the next request reports an offset conflict, cancel and start over.

Send JSON POST bodies as application/json, up to 64 KiB. Use root-relative paths such as Reports/sample.pdf. Use the path returned by list or upload_finish to address an existing item.

Successful JSON responses include "ok":true. Errors include "ok":false and error. Common statuses are 400 for invalid input, 401 for missing, expired or revoked credentials, 403 for a disallowed origin, 404 for a missing item, 409 for a conflict, 413 for a request above the size limit, 415 for an unsupported request content type, and 503 when storage or its connection is unavailable. Successful downloads return file bytes.

Authenticated NAS file operations and description requests have no NAS request-rate quota. Password attempts remain limited to 8 per IP and 80 across the service in 15 minutes; rejected login attempts return HTTP 429 with Retry-After. Upload-size limits and downstream description-helper limits still apply.

POST https://promptbox.cn/api/nas.php?op=api_login
Content-Type: application/json
{"password":"<NAS_PASSWORD_FROM_SECRET_STORE>"}

GET https://promptbox.cn/api/nas.php?op=list&path=Reports
Authorization: Bearer <ACCESS_TOKEN>

GET https://promptbox.cn/api/nas.php?op=download&path=Reports%2Fsample.pdf
Authorization: Bearer <ACCESS_TOKEN>
Range: bytes=0-1023

POST https://promptbox.cn/api/nas.php?op=upload_begin
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
{"path":"Reports","name":"sample.txt","size":5}

PUT https://promptbox.cn/api/nas.php?op=upload_chunk&id=<UPLOAD_ID>&offset=0
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/octet-stream
Content-Length: 5

hello

POST https://promptbox.cn/api/nas.php?op=upload_finish
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
{"id":"<UPLOAD_ID>"}

POST https://promptbox.cn/api/nas.php?op=api_logout
Authorization: Bearer <ACCESS_TOKEN>

Machine-readable NAS API catalog

notes.php

Persistent notes with search, status, and tags

Creates, reads, searches, edits, completes, restores, and deletes persistent JSON notes with titles, text, status, tags, timestamps, and optional metadata. The default overview action lists up to 100 notes, while individual note text may contain up to 50,000 characters. The helper has no Promptbox request quota, but stored notes are publicly accessible and must not contain secrets.

Send an action with the fields required for that operation and save returned note IDs for later edits. Notes are publicly accessible, so do not store secrets, confidential material, or sensitive personal information.

https://www.promptbox.cn/api/notes.php  GET POST
NameTypeDescription
actionstringoptionalDefault: overview. Supported values: create, read, edit, overview, delete, complete, and restore. Aliases include add, get, update, list, search, and remove.
note_idstringrequired except createSafe note identifier. If omitted on create, the helper generates one. Alias: id.
textstringrequired for createNote body text. Used by edit when replacing the body. Aliases: content and note.
titlestringoptionalShort human-readable title, up to 180 characters.
statusstringoptionalactive, completed, or archived. complete sets completed; restore sets active.
tagsarray/stringoptionalArray of tags, or a comma-separated string. Tags are normalized and capped for safe storage.
filterstringoptionalFor overview, use all, active, completed, or archived. Alias: status. Default: all.
qstringoptionalFor overview, filters by text found in title, body, or tags. Aliases: query and search.
limitnumberoptionalMaximum notes returned by overview. Range: 1-500. Default: 100.
include_textbooleanoptionalFor overview, include full note text in each row. Default returns excerpts only.
overwritebooleanoptionalFor create with a supplied ID, set to 1 to replace an existing note.
callbackstringoptionalGET-only JSONP callback name for sites where external fetch() is blocked. Alias: cb.
{ "success": true, "action": "create", "note_id": "note-20260618-021530-a1b2c3d4", "note": { "title": "Trip idea", "text": "...", "status": "active", "tags": [] } }

read, edit, complete, and restore return the full note. overview returns { "success": true, "count": 2, "total": 2, "notes": [...] }. delete returns { "success": true, "deleted": true }. On validation, missing note, or storage errors, the helper returns JSON like { "success": false, "error": "...", "code": 400 } with the matching HTTP status.

JSON POST requests must contain a valid JSON object. Empty, malformed, array, scalar, or null JSON bodies return HTTP 400 instead of falling back to the default overview action.

# Create a note POST notes.php Content-Type: application/json { "action": "create", "title": "Packing list", "text": "Bring passport, charger, and receipts.", "tags": ["travel"] } # Read one note GET notes.php?action=read&note_id=note-20260618-021530-a1b2c3d4 # Edit note text POST notes.php Content-Type: application/json { "action": "edit", "note_id": "note-20260618-021530-a1b2c3d4", "text": "Bring passport, charger, receipts, and headphones." } # Overview of active notes GET notes.php?action=overview&filter=active&q=travel # Mark completed, then delete POST notes.php Content-Type: application/json { "action": "complete", "note_id": "note-20260618-021530-a1b2c3d4" } POST notes.php Content-Type: application/json { "action": "delete", "note_id": "note-20260618-021530-a1b2c3d4" }

pdf_creator.php

Create PDFs from text or office documents

Creates a downloadable PDF from finished text or converts one supported office document while preserving its layout. Text input supports page size, orientation, margins, fonts, headers, footers, and metadata. File uploads are limited to 10 MB. Returns PDF bytes.

POST either content or one multipart file, with any optional page settings. Check the response status, then save the successful application/pdf bytes. Errors return JSON.

https://www.promptbox.cn/api/pdf_creator.php  GET POST
NameTypeDescription
filefileconditionalOne LibreOffice-compatible document or existing PDF, uploaded as multipart form data. Maximum 10 MB. Required when content is omitted.
contentstringconditionalFinished document text. Also accepts prompt or instructions. Required when file is omitted. Actual line breaks are preferred; literal \n sequences are normalized as line breaks.
titlestringoptionalDocument title printed at the top unless hide_title is true.
filenamestringoptionalDownload filename. .pdf is added if omitted.
page_sizestringoptionalletter, a4, or legal. Default: letter.
orientationstringoptionalportrait or landscape. Default: portrait.
marginnumberoptionalMargin in points, clamped from 24 to 96. Default: 54.
font_sizenumberoptionalBody font size in points, clamped from 8 to 18. Default: 11.
hide_titlebooloptionalSet to 1, true, or yes to omit the title from the page.

HTTP 200 with Content-Type: application/pdf and raw PDF bytes on success. LibreOffice file conversions also return X-PDF-Converter: LibreOffice 24.2. On error: JSON { "success": false, "error": "..." } with an appropriate HTTP status. Rate-limit failures return HTTP 429 and may include a Retry-After header.

# Create a short PDF report POST pdf_creator.php Content-Type: application/json { "title": "Weekly Notes", "content": "# Summary\n- First point\n- Second point", "filename": "weekly-notes.pdf" }
# Convert a local LibreOffice-compatible file while retaining its layout curl -F "file=@quarterly-report.xlsx" \ -F "filename=quarterly-report.pdf" \ -o quarterly-report.pdf \ https://www.promptbox.cn/api/pdf_creator.php

places.php

Search places, find nearby businesses, and retrieve details and reviews

Searches named places and businesses, finds nearby results, and retrieves addresses, coordinates, ratings, websites, opening hours, phone numbers, prices, and reviews. No caller API key is needed. If an initial text search finds no location, the helper automatically geocodes the query with Photon/OpenStreetMap and retries Google once with a coordinate bias before returning a not-found error.

Send GET or JSON POST with action=search, nearby, or details and the required fields below. Use a Google place ID from search results for details. Request only fields you display and show the required attribution. For street addresses, submit the complete address as query; fallback is automatic. Only returned Google IDs can be used for details. Fallback coordinates are a search hint, not a verified house destination. Review the fallback response before displaying or using coordinates.

https://www.promptbox.cn/api/places.php  GET POST

Use query parameters for GET or an application/json object for POST. Do not combine POST with query parameters. Maximum JSON body: 16 KiB.

ParameterTypeUsage
actionstringsearch (default), nearby, or details.
querystringRequired for search. Business, named place or category text such as milk tea in Saratoga CA; maximum 500 bytes. Street addresses are accepted; include house number, street, city and postal code for the automatic geocoding fallback.
lat, lngnumbersRequired together for nearby; optional together for search. Latitude −90 to 90; longitude −180 to 180. Not accepted for details.
radiusnumber1–50,000 meters; default 5,000. Requires coordinates. A strict circle for nearby; a geographic bias for search, which may return places outside the circle.
limitintegerSearch/nearby results per request, 1–20; default 5. Fewer results may be available.
rankstringSearch: relevance (default) or distance. Nearby: distance (default) or popularity. Distance requires coordinates. Results retain Google's ranking; distance ranking for text search is intended for categorical queries.
typesstring or arrayNearby only. Optional comma-separated list or JSON array of 1–50 Google place types, such as cafe or restaurant. Omit to search all types.
place_idstringRequired for details. Use a place's id from search/nearby, without a places/ prefix.
fieldsstring or arrayComma-separated field names or a JSON array. Default: id,displayName,formattedAddress,location,googleMapsUri. See supported fields below. Wildcards and places. prefixes are not accepted.
languagestringGoogle-supported language code, such as en (default) or zh-TW.
page_tokenstringSearch only. Use next_page_token from the previous response, keeping the other request parameters unchanged. Each page is a separate request.

Version 1.1.0: An initial search returning no places or HTTP 404 triggers one Photon/OpenStreetMap geocoding lookup, followed by one Google text-search retry biased to the returned coordinates. The original query, requested fields, limit, language and ranking remain unchanged; the supplied radius or 5,000 meters is used for the retry bias. Any distance_meters still measures from the caller's original coordinates. No unrelated nearby business is substituted for an address.

Fallback does not run for pagination, nearby, details, invalid input, authentication failures, quota errors or upstream outages. A geocoder with no match ends the search with HTTP 404; a geocoder outage or busy fallback returns HTTP 502 geocoding_unavailable. After a coordinate-assisted retry, an empty result is HTTP 404 not_found; Google retry errors retain their normal status. Google place IDs are never fabricated from OpenStreetMap data.

Photon is a separate provider using OpenStreetMap data. Its public endpoint permits moderate usage without an availability guarantee. Outbound geocoding is serialized and spaced at least one second apart, with private bounded caching (24 hours for coordinates, five minutes for misses, up to 300 entries); each uncached lookup counts against the shared helper quota. Use explicit submitted searches, not polling or keystroke requests. Display © OpenStreetMap contributors when fallback coordinates are used. They may be approximate or ambiguous; verify the address and house number before routing to a precise destination.

id, displayName, formattedAddress, location, googleMapsUri, types, primaryType, businessStatus, rating, userRatingCount, websiteUri, nationalPhoneNumber, internationalPhoneNumber, regularOpeningHours, currentOpeningHours, priceLevel, reviews, attributions.

id and attributions are always requested. Searches with coordinates also request location. Add rating,userRatingCount for ratings, websiteUri for a business website, or reviews for up to five available reviews. Request only the fields your app displays; missing data may be omitted.

GET /api/places.php?action=search&query=milk%20tea%20in%20Saratoga%20CA&limit=5

POST /api/places.php
Content-Type: application/json

{"action":"nearby","lat":37.7937,"lng":-122.3965,"radius":1500,"types":["cafe"],"limit":5,"fields":["displayName","formattedAddress","location","googleMapsUri","rating","userRatingCount"]}

POST /api/places.php
Content-Type: application/json

{"action":"details","place_id":"PLACE_ID_FROM_SEARCH","fields":"displayName,formattedAddress,googleMapsUri,websiteUri,rating,userRatingCount,reviews"}
async function callPlaces(parameters) {
  const response = await fetch('https://www.promptbox.cn/api/places.php', {
    method: 'POST',
    credentials: 'omit',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(parameters)
  });
  const data = await response.json();
  if (!response.ok || !data.success) throw new Error(data.error || 'Places request failed');
  return data;
}
const data = await callPlaces({ action: 'search', query: 'milk tea in Saratoga CA', limit: 5 });
for (const place of data.places) console.log(place.id, place.displayName?.text, place.formattedAddress);

Search/nearby return {success:true, action, provider:"Google Maps", places:[...], rate_limit:{...}}. Search may also return next_page_token. Details return {success:true, action:"details", provider:"Google Maps", place:{...}, rate_limit:{...}}.

Each place uses Google's field names: displayName.text, location.latitude, location.longitude, and reviews[].text.text. Searches with coordinates add distance_meters, the straight-line distance, not driving or walking distance. Empty nearby results and pagination remain places:[]; an initial text search with no match uses the fallback before returning an error.

When displaying results, show Google Maps attribution and any returned third-party attributions. Display review authors using reviews[].authorAttribution, including their links when available. Render returned text as text, not HTML. Follow Google's display, attribution, and storage rules.

Responses that use fallback include fallback:{attempted:true,provider:"Photon / OpenStreetMap",status:"found|no_match|unavailable|busy",retried:boolean}. Successful geocoding adds location:{latitude,longitude}, attribution:{text,url} and cached. The top-level provider and all places remain Google Maps. These fields also accompany fallback-related errors. Check retried to distinguish a completed Google retry from geocoding without a candidate.

All actions share the places rate-limit program: with shared rolling limits configured on the rate-limit dashboard (currently 200 upstream requests per 24 hours and no separate hourly cap). Check current usage with rate-limit.php?program=places&action=check. Each outbound Google call and uncached Photon lookup consumes one request, even on an upstream error. A full fallback can consume three requests (initial Google search, geocoding, Google retry); a cached geocode consumes none. Each step checks quota before dispatch and can return 429 if the remaining budget is exhausted. Invalid local input does not consume quota. Inspect rate_limit.remaining_day and remaining_hour in successful responses.

Errors return {success:false,error:"...",error_code:"..."}. Status codes: 400 invalid parameters/JSON, 403 unsupported browser origin, 404 place not found, 405 unsupported method, 413 oversized body, 415 non-JSON POST, 429 rate limit or upstream quota, 502 upstream failure, 503 service unavailable. A helper rate-limit response includes retry_after seconds; 429 responses include a Retry-After header. Wait for user action before retrying; do not poll.

publish.php

Publish and manage static apps, documents, and media

Publishes static HTML or ZIP web apps, supported documents, and media files to public Promptbox URLs. App deployments use private owner tokens and can be inspected, completely replaced, extended, deleted, or assigned a new token; each app has a renewable 30-day period. App uploads are limited to 25 MiB, file publications to 10 MiB, and static apps cannot run server-side code.

For an app, POST mode=app, a directory name, and either an HTML file, a complete ZIP build, or HTML text. Save the returned private token outside the published files. Use that token for later status, files, replace, extend, delete, or rotate-token operations. Every replacement must contain the complete app. For a document or media file, POST mode=file with one multipart file.

https://www.promptbox.cn/api/publish.php  GET POST
ActionMethodDescription
createPOSTPublish a new app or file. Omit action and send the appropriate mode.
statusGET, POSTReturn an owned app's URL, files, size, timestamps, and expiry.
filesGET, POSTReturn an owned app's file paths, sizes, content types, URLs, and expiry.
replacePOSTReplace an app with a complete build and renew it for 30 days.
extendPOSTRenew an app for 30 days without changing its files.
deletePOSTImmediately unpublish an app and invalidate its token.
rotate-tokenPOSTReturn a new owner token and invalidate the previous token.
capabilitiesGETReturn current availability, capacity, formats, and limits.
NameTypeRequiredDescription
modestringrequiredapp for static applications or file for documents and media.
directorystringrequired for new appsPreferred app directory name using 1–80 letters, digits, underscores, or hyphens.
filefileconditionalAn HTML or ZIP app build, or one supported document or media file. App uploads must include the complete build.
textstringconditionalUTF-8 HTML for app mode or UTF-8 content for supported text-file publishing.
tokenUUIDrequired for lifecycle actionsThe private owner token. Prefer Authorization: Bearer UUID; never place it in a URL.
actionstringoptionalA lifecycle action listed above. Omit it when creating new content.

New content returns HTTP 201 with a JSON receipt containing its public url and expires_at. New apps also return the only copy of the private owner token. Successful replacements return HTTP 200. Apps use renewable 30-day periods; published files expire after 30 days and have no management token. Honor Retry-After on HTTP 429, and inspect validation fields such as removed_files, sanitized_files, deleted_files, and stripped_prefix.

App uploads allow up to 25 MiB and 1,000 files. File-mode uploads allow up to 10 MiB for supported binary files and 1 MiB for UTF-8 text formats. Check live capabilities when current limits or availability matter.

curl https://www.promptbox.cn/api/publish.php \
-F 'mode=app' \
-F 'directory=my-app' \
-F 'file=@app.zip'
curl \
-H "Authorization: Bearer $PROMPTBOX_APP_TOKEN" \
"https://www.promptbox.cn/api/publish.php?action=status&mode=app"

Complete publishing guide · Complete publishing contract

qr.php

Downloadable QR cards for URLs, email, and Wi-Fi

Creates a downloadable PNG QR code card for a website, email address, or Wi-Fi network. Output is 600 by 600 pixels without a title and 600 by 800 pixels with one, with medium QR error correction. It has no Promptbox request quota; Wi-Fi passwords should be sent by POST so they do not appear in a URL.

Send a destination or Wi-Fi fields by GET or POST, then display or save the returned image/png. Prefer POST for Wi-Fi passwords so credentials do not appear in a URL.

https://www.promptbox.cn/api/qr.php  GET POST
NameTypeDescription
titlestringoptionalCard title, up to 100 characters. When omitted, the output is 600×600. Longer titles automatically use a smaller font.
destinationstringconditionalEmail address or website, up to 500 characters. Required when ssid is not supplied. Missing URL schemes are prefixed with https://; emails are prefixed with mailto:.
ssidstringconditionalWi-Fi network name, from 1 to 32 bytes. Supplying any Wi-Fi field switches the request to Wi-Fi mode.
passwordstringconditionalWi-Fi password, up to 128 characters. Required for WPA and WEP; omitted for open networks.
securitystringoptionalWPA, WEP, or nopass; defaults to WPA. WPA2 and WPA3 aliases are encoded as the scanner-compatible WPA type. encryption is accepted as an alias for this field.
hiddenbooleanoptionalSet to true for a hidden Wi-Fi network; defaults to false.

Returns image/png: 600×600 without a title or 600×800 with one. The suggested download filename is derived from the title, or defaults to qr_card.png. Wi-Fi special characters are escaped automatically. Errors return JSON with ok: false and error. The helper has no Promptbox request quota.

# GET in a browser or image tag https://www.promptbox.cn/api/qr.php?destination=example.com
# GET a titled 600×800 card https://www.promptbox.cn/api/qr.php?title=My+Portfolio&destination=example.com/portfolio
# POST a JSON body curl -X POST https://www.promptbox.cn/api/qr.php \ -H "Content-Type: application/json" \ -d '{"title":"Contact Support","destination":"support@example.com"}' \ -o contact-support.png
# POST Wi-Fi credentials as JSON (recommended so passwords do not appear in URLs) curl -X POST https://www.promptbox.cn/api/qr.php \ -H "Content-Type: application/json" \ -d '{"title":"Guest Wi-Fi","ssid":"Guest Network","password":"example-passphrase","security":"WPA","hidden":false}' \ -o guest-wifi.png
# Open Wi-Fi network; GET is convenient when no password is present https://www.promptbox.cn/api/qr.php?title=Guest+Wi-Fi&ssid=Guest+Network&security=nopass
// Display in JavaScript const url = 'https://www.promptbox.cn/api/qr.php?title=' + encodeURIComponent(title) + '&destination=' + encodeURIComponent(destination); cardImage.src = url;

rate-limit.php

Check and record rolling usage limits

Checks and records rolling daily and optional hourly request usage for a named program. New programs default to 300 requests per rolling day with no hourly limit, while existing programs may have custom limits. Use action=check for a non-consuming inspection and action=record to consume one request; denials return HTTP 429 and Retry-After. Deduplicated owner warnings at 90% usage are delivered after the HTTP response is closed, so SMTP delivery does not delay the caller.

The private usage and error log rotates at 8 MiB and retains two archives. Quota data is tracked separately from the log.

Send a program name and action=check to inspect availability or action=record to consume usage. Read the JSON response, and honor HTTP 429 and its Retry-After value.

https://www.promptbox.cn/api/rate-limit.php  GET POST
NameTypeDescription
client_idUUID stringoptionalPersistent random installation UUID for usage analysis. It does not change shared program quotas.
programstringrequiredProgram name to check/record. Letters, numbers, underscores, hyphens, and dots only.
actionstringoptionalrecord (default) — checks limit and records a use if allowed. check — checks limit only without recording.
{ "allowed": true, "usage_day": 5, "usage_hour": 2, "limit_day": 300, "limit_hour": null, "remaining_day": 295, "remaining_hour": null, "last_used": 1746388800 }
{ "allowed": false, "retry_after": 3612, "limit_type": "day", "message": "Rate limit exceeded (daily). Retry after 3612 seconds." }

The Retry-After HTTP header is also set when denied.

# Record a use for "myapp" GET rate-limit.php?program=myapp # Check limit without recording GET rate-limit.php?program=myapp&action=check # POST record POST rate-limit.php Content-Type: application/json { "program": "myapp", "action": "record" }

steam.php

Steam game reviews and community discussions

Retrieves Steam user reviews or searches community discussions for a game identified by name. Discussion search is the default; reviews=true selects reviews. Optional search terms narrow discussions, and unresolved game names return suggestions for a corrected request.

Send game_name by GET or POST. Set reviews=true for reviews or supply search_terms to narrow community discussions. Read the result in the documented response format and use returned suggestions if the game name cannot be resolved.

https://www.promptbox.cn/api/steam.php  GET POST
NameTypeDescription
game_namestringrequiredName of the Steam game to look up. The helper tries multiple fuzzy variations (removing articles, subtitles, edition labels, etc.) to improve match rate.
reviewsbooloptionalWhen true, fetches the 40 most recent user reviews instead of community discussions.
search_termsstringoptionalCustom search query for the community discussion search. Defaults to the game name if omitted.
{ "success": true, "content": "Plain-text summary of discussions or reviews..." }
# Community discussions about boss difficulty GET steam.php?game_name=Elden+Ring&search_terms=boss+difficulty # User reviews GET steam.php?game_name=Hades&reviews=true # POST POST steam.php Content-Type: application/json { "game_name": "Baldur's Gate 3", "search_terms": "multiplayer co-op" }

stock.php

Finnhub stock data — quotes, profiles, financials

Returns stock quotes, company profiles, and financial metrics for a ticker symbol, ISIN, or CUSIP. Returns all three sections by default; callers may request selected sections or metric groups. Quotes may be delayed, so check timestamps and warnings before using them.

Send the security identifier by GET or POST. Use sections to select quote, profile, or financials and financial_metric when needed. Inspect the JSON result, including timestamps and warnings.

https://www.promptbox.cn/api/stock.php  GET POST
NameTypeDescription
symbolstringrequired*Ticker symbol, e.g. AAPL. Exactly one of symbol, isin, or cusip must be provided.
isinstringoptional*ISIN identifier. Used instead of symbol when no ticker is known.
cusipstringoptional*CUSIP identifier. Used instead of symbol when no ticker is known.
sectionsstringoptionalComma-separated list of sections to fetch: quote, profile, financials. Also accepts all. Default: all three.
financial_metricstringoptionalWhich financial metric group to request from Finnhub: all (default), price, valuation, or margin.
{ "success": true, "content": "Stock data result\n...", "data": { "identifier": {...}, "resolved_symbol": "AAPL", "sections": [...], "profile": {...}, "quote": {...}, "financials": {...}, "warnings": [] } }

On error: { "success": false, "error": "..." } with HTTP 400.

# Quote + profile for Apple GET stock.php?symbol=AAPL&sections=quote,profile # Full data for a stock identified by ISIN GET stock.php?isin=US0231351067 # POST – financials only POST stock.php Content-Type: application/json { "symbol": "NVDA", "sections": "financials", "financial_metric": "valuation" }

transcribe.php

Transcribe speech to plain text

Transcribes uploaded or base64-encoded spoken audio into plain text with Gemini Lite, synchronous AssemblyAI, or a Promptbox-hosted Whisper large-v3-turbo worker. Accepts audio up to 10 MB. Recordings shorter than 0.5 seconds, silence, or unintelligible audio may return null. Optional action=streaming_token returns a short-lived credential for a live WebSocket transcription session. Use llm_gemini.php to ask questions about a recording.

POST an audio file as multipart form data or send base64 audio in JSON. Set provider=whisper for Promptbox-hosted Whisper, provider=assembly for synchronous AssemblyAI, or provider=gemini for Gemini Lite. Read the successful response as plain text. A body value takes precedence over the query parameter. Omitting provider preserves the fast selector and defaults to Gemini. AssemblyAI accepts up to 20 minutes. Whisper accepts up to 10 minutes and returns HTTP 503 while its worker is busy or offline. Each route makes one provider request and stops on failure.

https://www.promptbox.cn/api/transcribe.php  GET POST
NameTypeDescription
actionstringoptionalOmit for existing audio transcription. POST streaming_token without audio to return a JSON credential and connection parameters for live transcription. This consumes one transcribe quota use. The credential can open sessions during its 60-second redemption window; it is not a permanent API key and must not be logged or saved.
max_session_duration_secondsintegeroptionalStreaming-token mode only: 60–180 seconds, default 120. Locally terminate the WebSocket on completion, cancel or inactivity; provider session limits can include a final-turn grace period.
audiofile or stringrequiredAudio to transcribe. For browser use, send a multipart file field named audio, audio_blob, or file. For JSON/form use, send a base64 string or data URI in audio or audio_base64. Max 10 MB.
providerstringoptionalFor recorded audio, select gemini, assembly, or whisper. An explicit provider takes precedence over fast. Whisper supports WAV, WebM, MP4/M4A, MP3, Ogg, FLAC, and AAC.
fastbooleanoptionalLegacy provider selector used when provider is omitted. Defaults to false for Gemini. Set true or 1 for AssemblyAI. Also accepts false/0, yes/no, and on/off. Invalid values return HTTP 400.
audio_mime_typestringoptionalMIME type when it is not supplied by the upload or data URI. Common values: audio/webm, audio/mp4, audio/mpeg, audio/wav, audio/ogg.
duration_msnumberoptionalRecording duration in milliseconds. Also accepts audio_duration_ms, duration_seconds, audio_duration_seconds, duration, or audio_duration. Values under 500 ms return null.
languagestringoptionalExpected spoken language. Whisper and AssemblyAI accept supported ISO codes, locale forms such as zh-TW, and the names English, Chinese, Mandarin, Cantonese, Japanese, and Korean. Whisper accepts one language, and AssemblyAI also accepts a comma-separated list such as en,zh. Omit the field or use auto for automatic recognition on those routes. Locale forms select the base spoken language. Unsupported codes return HTTP 400.
contextstringoptionalNames, vocabulary, or preceding text to help recognition. The context itself is not transcribed.
promptstringoptionalGemini accepts a custom transcription instruction. With AssemblyAI and Whisper, context and prompt are vocabulary hints. The combined limit is 6,000 characters for AssemblyAI and 1,000 UTF-8 bytes for Whisper. AssemblyAI contextual prompting may carry an additional provider charge.

text/plain transcript text or null for audio with no recognized speech. Input errors return a plain error string with HTTP 400. Provider failures return HTTP 502. An unavailable local credential or worker returns HTTP 503. A busy Whisper worker includes a Retry-After header. All providers share the transcribe rate limit (HTTP 429 if exceeded).

Streaming-token response: {"ok":true,"token":"temporary credential","expires_in_seconds":60,"max_session_duration_seconds":120,"websocket_url":"wss://streaming.assemblyai.com/v3/ws","sample_rate":16000,"encoding":"pcm_s16le","speech_model":"universal-3-6-pro"}. Connect using the token and returned audio parameters. Send binary mono PCM16 in 50–1000 ms frames at real-time speed. On release, send {"type":"ForceEndpoint"} and {"type":"Terminate"}, then keep reading Turn messages until Termination. Assemble transcript turns by turn_order; later updates replace earlier text for the same turn. Close on cancel and never log the credential. Errors use a non-2xx status without a credential. This mode does not accept JSONP.

# Browser microphone recording via MediaRecorder const form = new FormData(); form.append('audio', audioBlob, 'speech.webm'); form.append('audio_mime_type', audioBlob.type || 'audio/webm'); form.append('duration_ms', String(recordingMs)); form.append('provider', 'whisper'); const transcript = await fetch('https://www.promptbox.cn/api/transcribe.php', { method: 'POST', credentials: 'omit', body: form }).then(r => r.text()); # JSON base64 / data URI POST transcribe.php Content-Type: application/json { "audio": "data:audio/webm;base64,GkXfo59...", "provider": "assembly", "language": "English", "context": "The speaker may mention technical product names." }

transcript.php

YouTube transcript extraction API

Returns existing captions for a public YouTube video in a JSON transcript field. Choose it for captions from one known video; use youtube.php to research a topic across videos or transcribe.php for your own audio. The helper checks its cache, then tries YouTube and can fall back to another existing-caption retrieval route. Cached captions may be up to 30 days old when a refresh fails; check stale and any warning.

Send an 11-character videoId or a YouTube URL by GET or POST and read transcript from the JSON result. The helper requires no sign-in. It returns existing captions only. Read provider to distinguish youtube from self-hosted, and check stale before using a cached result. If retrieval is temporarily unavailable, try again later.

https://www.promptbox.cn/api/transcript.php  GET POST
NameTypeDescription
videoIdstringoptionalThe 11-character YouTube video ID. Also accepted as video_id.
urlstringoptionalA YouTube watch, share, embed, or Shorts URL. Required only when videoId is omitted.
callbackstringoptionalGET-only JSONP callback name. cb is also accepted.

Cached transcripts are fresh for seven days. If a refresh fails, captions up to 30 days old may be returned with stale:true and a warning. Each request makes one retrieval pass; offer an explicit later retry when needed.

{ "success": true, "videoId": "dQw4w9WgXcQ", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "transcript": "...", "length": 2335, "source": "promptbox-youtube-captions", "provider": "youtube", "generated": false, "cached": false, "stale": false }

Returns an error if the video ID is invalid, the video has no accessible YouTube captions, or the helper hits its rate limit.

Success includes source: promptbox-youtube-captions, cached and stale; cache hits also include cache_age_seconds. Stale recovery includes a warning and does not refresh the saved timestamp. Retrieval failures return HTTP 503 with retryable: true and diagnostics containing stage, HTTP status, response byte count and transport-error flag, without bodies or credentials. Upstream HTTP 429 uses error_code: youtube_rate_limited; HTTP 403 uses youtube_request_rejected; other failures remain caption_fetch_failed and do not prove captions are absent. If fallback retrieval is busy, fallback_error_code can be caption_worker_busy. Shared helper rate limits return HTTP 429 and retry_after. Callers may skip failed videos or offer an explicit later retry while retaining completed work. Invalid input returns HTTP 400.

# Simple GET by video ID GET transcript.php?videoId=dQw4w9WgXcQ # GET by URL GET transcript.php?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ # POST with JSON body POST transcript.php Content-Type: application/json { "videoId": "dQw4w9WgXcQ" }

transfer.php

Temporary file transfer REST API

Uploads temporary files, returns eight-character receipts and download URLs, reports receipt metadata, streams stored files, and supports explicit deletion. Files expire after three days and are deleted after the first API download by default unless auto_delete=0 is supplied. Each upload may be roughly 850 MB, but callers should inspect the JSON receipt before relying on storage.

POST multipart files with action=upload, save the returned receipt, and use its browser or API download URL. Files expire after three days and are deleted after the first API download by default unless auto_delete=0 was supplied.

https://www.promptbox.cn/api/transfer.php  GET POST
NameTypeDescription
actionstringrequiredupload, info, download, delete, or clipboard_copied. If omitted, multipart uploads default to upload and GET with receipt defaults to info.
userfile[] / filefilerequired for uploadMultipart file field. Multiple userfile[] parts are bundled into a ZIP unless clipboard_upload=1.
receiptstringrequired for receipt actionsThe 8-character transfer receipt. A full transfer URL containing ?receipt=... is also accepted.
auto_deletebooloptionalUpload option. Default 1; set 0 to retain the file until the 3-day expiration even after download.
folder_uploadbooloptionalUpload option. Set 1 to force ZIP packaging and preserve paths from userfile_paths[].
userfile_paths[]string[]optionalRelative paths for ZIP entries when uploading folders or multiple files.
clipboard_uploadbooloptionalUpload option. Set 1 to mark the single file as clipboard-origin content.
inlinebooloptionalDownload option. Set 1 to stream with Content-Disposition: inline instead of attachment.
{ "success": true, "receipt": "AbC234xy", "filename": "photo.jpg", "mime_type": "image/jpeg", "size": 12345, "auto_delete": true, "expires_after_seconds": 259200, "download_url": "https://transfer.promptbox.cn/index.php?receipt=AbC234xy", "api_download_url": "https://www.promptbox.cn/api/transfer.php?action=download&receipt=AbC234xy" }

info, upload, delete, and clipboard_copied return JSON. download streams the file bytes directly and removes the receipt afterward unless the upload was retained. Validation, missing receipt, expired receipt, storage, and rate-limit errors return JSON like { "success": false, "error": "...", "code": 400 }; rate-limit denials also set Retry-After when available.

# Upload one file curl -F action=upload -F auto_delete=1 -F userfile[]=@photo.jpg https://www.promptbox.cn/api/transfer.php # Get receipt metadata GET transfer.php?action=info&receipt=AbC234xy # Download the file bytes GET transfer.php?action=download&receipt=AbC234xy # Upload several files as one ZIP curl -F action=upload -F userfile[]=@a.txt -F userfile[]=@b.txt https://www.promptbox.cn/api/transfer.php

tts.php

Multilingual speech with selectable voices and speed

Converts up to 50,000 characters of text into one MP3 or WAV speech file, or streams complete MP3 or WAV blocks for earlier playback, with selectable voices and speed. Defaults to shimmer (Katerina), MP3, and normal speed. Supports Chinese, English, French, German, Russian, Italian, Spanish, Portuguese, Japanese, and Korean. Voice aliases are accepted; hear the selected voice before relying on its accent or timbre.

Send text by GET, JSON POST, or form POST, with optional voice, format, and speed. Save or play the returned audio bytes. For earlier playback, set stream=true and format=mp3 for compressed blocks, or omit format for compatible WAV blocks. Decode each audio record from the application/x-ndjson response as it arrives. MP3 streams use incremental gzip transport when the client accepts gzip, reducing the base64 envelope overhead without re-encoding audio. Browser fetch decodes this transport automatically; other HTTP clients should enable gzip decoding. Each record is flushed immediately. This is block streaming: the provider synthesizes each block completely. Do not wait for the whole response or automatically repeat a partially played request.

https://www.promptbox.cn/api/tts.php GET POST
NameTypeRequirementDescription
textstringrequiredText, maximum 50000 characters after markup cleanup. Empty or oversized inputs return HTTP 400. Longer requests take more time; allow sufficient client time or send smaller narration blocks for incremental playback.
voicestringoptionalCase-insensitive legacy aliases: alloy→Ethan, ash→Li, ballad→Ryan, coral→Cherry, echo→Nofish, fable→Dylan, onyx→Marcus, nova→Jennifer, sage→Elias, shimmer→Katerina, verse→Peter, marin→Kiki, cedar→Roy. Also accepts Qwen native voice: Cherry, Ethan, Nofish, Jennifer, Ryan, Katerina, Elias, Jada, Dylan, Sunny, Li, Marcus, Roy, Peter, Rocky, Kiki, Eric. Unknown values use shimmer (Katerina).
formatstringoptionalmp3 (default) or wav. Unknown formats use mp3.
speednumberoptionalDefault 1.0; clamped to 0.25–4.0. Controls playback speed.
streambooleanoptionalDefault false. True returns application/x-ndjson records with base64 audio blocks instead of one audio file. The first block is at most 160 characters, later blocks at most 600; all text remains ordered. Streaming uses WAV when format is omitted. Explicit format=mp3 returns compressed MP3 blocks; format=wav returns WAV blocks. Speed still applies. One request consumes one quota count.

Each legacy alias maps to a distinct Qwen voice. Gender follows Alibaba's voice descriptions; Elias is female and Li is male. Neutral-sounding alloy maps to male Ethan.

Legacy nameQwen voiceGender
alloyEthanMale (neutral legacy voice)
ashLiMale
balladRyanMale
coralCherryFemale
echoNofishMale
fableDylanMale
onyxMarcusMale
novaJenniferFemale
sageEliasFemale
shimmerKaterinaFemale
versePeterMale
marinKikiFemale
cedarRoyMale

By default, HTTP 200 with raw audio/mpeg or audio/wav bytes. With stream=true, HTTP 200 with application/x-ndjson: each line is {"type":"audio","index":0,"format":"wav","data":"BASE64"}, or format=mp3 and MP3 data when requested, followed by {"type":"done","chunks":1}. An upstream failure after streaming starts produces {"type":"error","error":"..."}; a missing done record means an incomplete stream. Stop queued playback on failure or cancellation. Audio records may span multiple network reads; buffer until a newline. Before streaming begins, validation, configuration and rate-limit errors use the normal JSON and HTTP error contract. Errors return JSON {"success":false,"error":"..."} with HTTP 400, 405, 429, 500 or 502. The request quota counts each helper request once. Native Qwen voice names and legacy aliases are accepted case-insensitively. No caller API key is needed.

GET tts.php?text=Hello+world&voice=nova POST tts.php {"text":"你好。Hello.こんにちは。","voice":"Jennifer","format":"wav","speed":1.25} POST tts.php Content-Type: application/json {"text":"Read this aloud as each block arrives.","voice":"Jennifer","stream":true,"format":"mp3"}

tts_local.php

Generate English and Mandarin speech on a connected local GPU

Converts text into a single MP3 or WAV file or streams independently playable audio blocks. Fish Audio S2 Pro is the default for expressive speech. Ming 3.0 TTS 0.5B is the fast option. Both support English, Mandarin, and voice cloning. Built with Fish Audio. Fish is licensed for research and non-commercial use. Fish Audio Research License.

Use the free public endpoint with GET, JSON POST, or form POST. Choose from four English and 225 Chinese Ming voice IDs in the preset catalog. Use JSON POST when sending a voice reference. Set model=fast for Ming and stream=true to start playback before the full passage is ready. At normal speed, the first audio block is 1.5 seconds and subsequent blocks are 3 seconds. The last block can be shorter. For longer Fish passages, set text_chunk_size=600 to reduce synthesis breaks within the passage. The service processes one synthesis request at a time across all callers. A busy service returns HTTP 409 with Retry-After. A connected desktop must be online. Each request loads its model on demand and releases its GPU memory before completion. Text, voice references, and generated audio are held in a private relay while the request is active and discarded after delivery or expiry cleanup. Use a reference voice only with permission.

https://www.promptbox.cn/api/tts_local.php GET POST
ActionMethodDescription
Speech synthesisGET, POSTSend text and optionally choose the model, voice, speed, format, or streaming.
statusGETUse ?action=status to check worker availability and model IDs. Status checks are public and do not count toward the synthesis quota.
NameTypeRequirementDescription
textstringrequiredText to speak, up to 2,000 characters.
modelstringoptionalfish or default selects Fish Audio S2 Pro. ming or fast selects Ming 3.0 TTS 0.5B. Defaults to fish.
text_chunk_sizeintegeroptionalFish only. Use 200 (default) or 600 characters per synthesis chunk. Fish prefers sentence boundaries when splitting longer input. This setting controls how Fish groups text. Streamed WAV block durations are independent.
languagestringoptionalauto (default), en, or zh. Use the preset’s language or auto with a named voice. For plain or reference-driven Ming synthesis, en and zh select the language explicitly. Fish detects the language from the text.
voicestringoptionaldefault or one of the Ming IDs listed below. Omit when cloning.
reference_audiostringoptionalBase64-encoded mono or stereo PCM WAV. Use 1–30 seconds and at most 4 MiB of decoded audio. Send in JSON POST.
reference_textstringconditionalVerbatim reference transcript up to 1,200 characters. Required for Fish cloning and optional for Ming cloning.
formatstringoptionalmp3 or wav. Defaults to MP3 for files and WAV for streams.
speednumberoptionalPlayback speed, default 1.0 and clamped to 0.25–4.0.
streambooleanoptionalSet true for incremental audio records. The request should include the complete text.

For a named voice, set model=ming (or fast) and pass the exact ID as voice. Fish offers voice=default and reference-audio cloning. The default Fish voice is chosen by the model.

Machine-readable preset voice list · Ming voice descriptions and uses

English voice IDAccentVoice
US_EmmaUSFemale
US_JamesUSMale
UK_GeorgeUKMale
UK_CharlotteUKFemale
Chinese presets (28)

灵小安 · 灵语汐 · 灵小萌 · 灵小柔 · 灵小雅 · 灵韵 · 灵婉 · 灵小月 · 灵朵儿 · 灵小锋 · 灵小川 · 灵小甄 · 灵小知 · 灵小惠 · 灵小晴 · 灵小琪 · 灵梦 · 灵恬 · 灵小汐 · 灵小棠 · 灵小梨 · 灵小芸 · 灵空 · 灵宇 · 灵朗 · 灵楷 · 灵旭 · 灵江

Chinese emotion variants (197)

Use the full voice ID including its emotion suffix.

Base voiceExact voice IDs
灵晓声灵晓声_惊讶 · 灵晓声_厌恶 · 灵晓声_高兴 · 灵晓声_中性 · 灵晓声_悲伤
灵风信灵风信_生气 · 灵风信_中性 · 灵风信_厌恶 · 灵风信_高兴 · 灵风信_悲伤
灵惜梦灵惜梦_中性 · 灵惜梦_厌恶 · 灵惜梦_高兴 · 灵惜梦_悲伤 · 灵惜梦_恐惧 · 灵惜梦_惊讶 · 灵惜梦_生气
灵逸风灵逸风_悲伤 · 灵逸风_惊讶 · 灵逸风_中性 · 灵逸风_恐惧 · 灵逸风_高兴
灵悦澜灵悦澜_中性 · 灵悦澜_高兴 · 灵悦澜_厌恶 · 灵悦澜_恐惧 · 灵悦澜_生气 · 灵悦澜_悲伤
灵御心灵御心_高兴 · 灵御心_中性 · 灵御心_生气
灵语恬灵语恬_高兴 · 灵语恬_恐惧 · 灵语恬_悲伤 · 灵语恬_惊讶 · 灵语恬_生气 · 灵语恬_中性
灵心恬灵心恬_厌恶 · 灵心恬_惊讶 · 灵心恬_悲伤 · 灵心恬_中性 · 灵心恬_恐惧 · 灵心恬_高兴 · 灵心恬_生气
灵亦尘灵亦尘_中性 · 灵亦尘_恐惧
灵语尘灵语尘_高兴 · 灵语尘_厌恶 · 灵语尘_惊讶 · 灵语尘_中性 · 灵语尘_悲伤 · 灵语尘_恐惧
灵悦兮灵悦兮_高兴 · 灵悦兮_中性 · 灵悦兮_生气 · 灵悦兮_惊讶 · 灵悦兮_厌恶 · 灵悦兮_悲伤 · 灵悦兮_恐惧
灵若虚灵若虚_惊讶 · 灵若虚_中性 · 灵若虚_悲伤 · 灵若虚_高兴 · 灵若虚_厌恶 · 灵若虚_生气
灵未央灵未央_高兴 · 灵未央_中性 · 灵未央_惊讶 · 灵未央_悲伤 · 灵未央_恐惧 · 灵未央_生气
灵梦瑶灵梦瑶_中性 · 灵梦瑶_高兴 · 灵梦瑶_悲伤 · 灵梦瑶_惊讶 · 灵梦瑶_生气
灵妙声灵妙声_中性 · 灵妙声_悲伤
灵言澈灵言澈_中性 · 灵言澈_高兴
灵嘉肴灵嘉肴_中性 · 灵嘉肴_恐惧
灵孤影灵孤影_中性
灵雨汐灵雨汐_中性 · 灵雨汐_恐惧 · 灵雨汐_高兴 · 灵雨汐_悲伤 · 灵雨汐_惊讶
灵信远灵信远_生气 · 灵信远_惊讶 · 灵信远_高兴 · 灵信远_恐惧 · 灵信远_悲伤
灵思齐灵思齐_高兴 · 灵思齐_恐惧 · 灵思齐_厌恶 · 灵思齐_惊讶 · 灵思齐_悲伤
灵叙柔灵叙柔_高兴 · 灵叙柔_惊讶
灵绮木灵绮木_厌恶 · 灵绮木_高兴 · 灵绮木_生气
灵渊霆灵渊霆_厌恶 · 灵渊霆_恐惧 · 灵渊霆_惊讶 · 灵渊霆_悲伤 · 灵渊霆_生气 · 灵渊霆_高兴
灵素心灵素心_悲伤 · 灵素心_厌恶
灵采薇灵采薇_厌恶 · 灵采薇_生气 · 灵采薇_高兴
灵卓然灵卓然_恐惧 · 灵卓然_悲伤
灵浅忧灵浅忧_高兴 · 灵浅忧_厌恶 · 灵浅忧_悲伤 · 灵浅忧_恐惧
灵昭野灵昭野_高兴 · 灵昭野_悲伤 · 灵昭野_厌恶
灵心澜灵心澜_高兴 · 灵心澜_悲伤
灵犀言灵犀言_悲伤 · 灵犀言_生气
灵语冰灵语冰_悲伤 · 灵语冰_高兴 · 灵语冰_惊讶
灵惊鸿灵惊鸿_厌恶 · 灵惊鸿_高兴 · 灵惊鸿_惊讶 · 灵惊鸿_生气 · 灵惊鸿_悲伤
灵惜蕊灵惜蕊_惊讶 · 灵惜蕊_厌恶 · 灵惜蕊_恐惧 · 灵惜蕊_高兴 · 灵惜蕊_悲伤 · 灵惜蕊_生气
灵语萱灵语萱_厌恶 · 灵语萱_高兴 · 灵语萱_恐惧 · 灵语萱_生气 · 灵语萱_悲伤
灵语烟灵语烟_生气 · 灵语烟_恐惧 · 灵语烟_厌恶 · 灵语烟_高兴 · 灵语烟_悲伤
灵律雅灵律雅_恐惧 · 灵律雅_生气 · 灵律雅_高兴
灵惊涛灵惊涛_恐惧
灵寒陌灵寒陌_厌恶 · 灵寒陌_高兴
灵决冥灵决冥_厌恶 · 灵决冥_生气 · 灵决冥_恐惧
灵慈萱灵慈萱_生气 · 灵慈萱_悲伤 · 灵慈萱_恐惧
灵妙音灵妙音_悲伤 · 灵妙音_惊讶 · 灵妙音_厌恶 · 灵妙音_高兴 · 灵妙音_恐惧
灵断尘灵断尘_悲伤 · 灵断尘_高兴 · 灵断尘_惊讶 · 灵断尘_恐惧 · 灵断尘_厌恶
灵熙婉灵熙婉_高兴 · 灵熙婉_恐惧 · 灵熙婉_悲伤
灵旭扬灵旭扬_生气 · 灵旭扬_恐惧 · 灵旭扬_高兴 · 灵旭扬_惊讶 · 灵旭扬_悲伤 · 灵旭扬_厌恶
灵阅川灵阅川_生气 · 灵阅川_悲伤 · 灵阅川_高兴 · 灵阅川_厌恶 · 灵阅川_恐惧
灵妩月灵妩月_厌恶 · 灵妩月_生气 · 灵妩月_惊讶 · 灵妩月_恐惧 · 灵妩月_高兴 · 灵妩月_悲伤
灵汐月灵汐月_悲伤 · 灵汐月_高兴
灵黛嗔灵黛嗔_厌恶 · 灵黛嗔_高兴

HTTP 200 returns raw audio/mpeg or audio/wav. Streaming returns application/x-ndjson with records such as {"type":"audio","index":0,"format":"wav","data":"BASE64"} and {"type":"done","chunks":1}. Buffer bytes until a newline, then decode and play audio in index order. A failure after audio starts sends {"type":"error","error":"..."}. A stream missing its done record is incomplete. At other speeds, each block uses 3 seconds of source speech before the speed adjustment.

Before audio starts, errors use {"success":false,"error":"..."}. HTTP 400 applies to invalid inputs, 409 to a busy worker, 413 to oversized inputs, 429 to rate limits, 502 to a generation failure, 503 to an offline worker, and 504 to a request timeout. The shared tts_local rate limit counts each accepted request once. On 409, 429, or 503, observe Retry-After when present.

curl -fsS 'https://www.promptbox.cn/api/tts_local.php?action=status'

curl -fsS 'https://www.promptbox.cn/api/tts_local.php' \
  -H 'Content-Type: application/json' \
  -d '{"text":"Hello and welcome.","format":"mp3"}' -o speech.mp3

curl -fsSN 'https://www.promptbox.cn/api/tts_local.php' \
  -H 'Content-Type: application/json' \
  -d '{"text":"你好,欢迎。","model":"fast","language":"zh","voice":"灵小柔","stream":true}'

twitter.php

Social media search — Twitter/X, Facebook, Reddit

Searches public Twitter/X, Facebook, and Reddit posts or comments and returns a formatted summary plus structured results. Defaults to Twitter/X, Facebook, and Reddit posts; select Reddit comments explicitly. Supports sorting, pagination, and optional Facebook sentiment. Queries are limited to 500 characters.

Send query by GET or POST and choose platforms when needed. Start with one page per platform. Read the structured results to display links, authors, and metadata, and check any warnings.

https://www.promptbox.cn/api/twitter.php  GET POST
NameTypeDescription
querystringrequiredSearch query. Also accepted as q. Max 500 characters.
platformsstringoptionalComma-separated platforms: twitter, facebook, reddit_posts, reddit_comments, or all. Default: twitter,facebook,reddit_posts.
pagesintegeroptionalNumber of result pages to fetch per platform (1–10 for Twitter/Facebook; 1–5 for Reddit). Default: 1.
sort_bystringoptionalSort order. Twitter: most_recent (default) or relevance. Reddit: most_recent, relevance, hot, top. Facebook: relevance (default) or most_recent.
start_datestringoptionalFacebook only. Filter start date in YYYY-MM-DD format.
end_datestringoptionalFacebook only. Filter end date in YYYY-MM-DD format.
get_sentimentbooloptionalFacebook only. Pass true to include sentiment analysis (polarity + emotion) in results.
{ "success": true, "content": "Social media search results\n...", "data": { "query": "...", "platforms": [...], "results": { "twitter": [...], "reddit_posts": [...] }, "warnings": [] } }
# Twitter + Reddit search GET twitter.php?query=electric+vehicles&platforms=twitter,reddit_posts # Facebook with sentiment and date filter GET twitter.php?query=climate&platforms=facebook&get_sentiment=true&start_date=2025-01-01&end_date=2025-06-01 # All platforms, 2 pages each POST twitter.php Content-Type: application/json { "query": "AI news", "platforms": "all", "pages": 2 }

video_compress.php

Phone-friendly MP4 compression

Compresses an uploaded MP4 into a smaller phone-compatible H.264/AAC MP4 using FFmpeg. The default balanced profile caps the long edge at 1280 pixels; small and quality target roughly 540p and 1080p, respectively. It accepts files up to 600 MB, has no Promptbox request quota, and retains no output unless save is explicitly enabled.

POST the source in the multipart video field with any optional compression settings, then save the returned video/mp4 bytes. Enable save only when a public archived copy is required.

GET POST https://www.promptbox.cn/api/video_compress.php
MethodReturnsDescription
GETJSONReturns the helper version, upload limit, accepted file fields, profiles, and output codecs.
POSTMP4 bytesAccepts multipart form data and returns the compressed video as an attachment.
NameTypeDescription
videofilerequiredMP4 upload up to 600 MB. The field aliases media and file are also accepted.
profilestringoptionalsmall caps the long edge at 960 pixels (about 540p), balanced at 1280 pixels (about 720p), or quality at 1920 pixels (about 1080p). Default: balanced.
savebooleanoptionalSet to 1, true, yes, or on to archive the compressed result in Promptbox music/ storage. Temporary processing files are still removed. Alias: save_to_music.
filenamestringoptionalPreferred base filename when save is enabled. The helper sanitizes it and adds a timestamp plus a random suffix.
const form = new FormData();
form.append('video', fileInput.files[0]);
form.append('profile', 'balanced');

const response = await fetch('https://www.promptbox.cn/api/video_compress.php', {
  method: 'POST',
  credentials: 'omit',
  body: form
});
if (!response.ok) {
  const error = await response.json();
  throw new Error(error.error);
}

const blob = await response.blob();
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = 'video-smaller.mp4';
link.click();
setTimeout(() => URL.revokeObjectURL(url), 30000);

A successful POST returns raw video/mp4 bytes with a downloadable filename. Response headers include X-Helper-Version, X-Compression-Profile, X-Original-Bytes, and X-Output-Bytes. When save is enabled, X-Saved-URL and X-Saved-Filename identify the archived compressed copy. These headers are CORS-exposed. Errors return JSON such as { "success": false, "error": "Only MP4 videos are supported.", "code": 415 }. The helper has no Promptbox request quota. Browser origin restrictions described above still apply.

Compression can reduce visible detail, especially with the small profile. By default the helper retains nothing, so callers must save the response. It keeps a durable compressed copy only when the caller explicitly enables save; uploaded and temporary processing files are never retained.

web.php

Live web search — returns a number or plain-text answer

Searches the live web and returns a number, a plain-text answer, or structured search evidence with format=json. The default returns the first number found; text=true returns prose. Queries are capped at 400 characters, and url can restrict the source domain. Use web_read.php to read a particular page or file.

Send prompt by GET or POST and read plain text. Set text=true for a prose answer, max_sentences for a length cap, or url for a source domain. Use mode=image_prompt_refine only to improve an image prompt; that mode does not search the web.

https://www.promptbox.cn/api/web.php  GET POST
NameTypeDescription
promptstringrequiredThe question or search query. Also accepted as q. Tavily queries are capped at 400 characters; longer queries are truncated before sending.
urlstringoptionalDomain to restrict search results to, e.g. reuters.com. Leave empty to search the open web.
textbooloptionalDefault false. When false, returns only the first number found. When true, returns a plain-text answer (length controlled by max_sentences).
formatstringoptionalSet json for one advanced search with up to five results and a JSON response containing ok, text, answer_type, answer_status, sources, retrieved_at, query_truncated, warnings, and search_helper:"web.php". Uses the prompt as supplied, ignores numeric/sentence formatting, preserves the domain filter, and performs no retry. Errors return JSON with the HTTP error status; rate limits use 429. This format applies to search, not image prompt refinement.
max_sentencesintegeroptionalOnly applies when text=true. Caps the answer to this many sentences. Default: 0 (no cap — full answer returned).
modestringoptionalSet to image_prompt_refine to use Gemini to rewrite the prompt into a detailed image generation prompt (skips Tavily entirely).

format=json returns application/json with generated, unverified search text and bounded source evidence; it does not verify facts or provide full-page extraction. Otherwise returns text/plain. With text=false (default): a plain number string like 189.34, or null if no number was found. With text=true: a plain-text answer. If the Tavily query is over 400 characters, it is truncated and the response appends Tool Error: Query truncated, max query length is 400 characters. On error: null with an appropriate HTTP status code.

# Get current Apple stock price (returns a number) GET web.php?prompt=What+is+the+current+AAPL+stock+price # Full text answer, no sentence cap GET web.php?prompt=Explain+the+Fed+rate+decision&text=true # Text answer capped at 3 sentences, from a specific source GET web.php?prompt=latest+Fed+interest+rate+decision&url=reuters.com&text=true&max_sentences=3 # Refine an image prompt using Gemini GET web.php?mode=image_prompt_refine&prompt=a+dog+on+the+moon

web_read.php

URL/file reader, detailed picture descriptions, and automatic web search returning JSON text

Extracts text and source metadata from one public URL or uploaded file, including webpages, PDFs, office documents, feeds, images, media, and YouTube captions. All image, PDF-page, and embedded-document-image OCR uses OpenAI gpt-6-luna. Standalone images retain their original resolution. Every OCR response must finish normally; refusals, missing output, and token-truncated output return an error without model fallback. JPEG, PNG, and WebP bytes are sent unchanged; other image formats are converted to full-resolution PNG, using the first frame for animated images. Every standalone image returns both Visual description: and Text transcription: sections in text. The transcription includes every readable word, number, table cell, footnote, and handwritten note in the original language and reading order, with unreadable portions marked [illegible]; images without readable lettering return [No readable text] in that section. Photographs, portraits, scenes, and illustrations receive detailed plain-text visual descriptions suitable as an artist’s reconstruction reference. Document images, text screenshots, charts, and tables also receive a visual description of their layout, colors, typography, graphics, and spatial arrangement, followed by the complete transcription. Descriptions cover composition, framing, perspective, subject placement and proportions, visible facial features and hair, expression and gaze, pose and hand positions, clothing and accessories, objects and background, colors, textures, lighting, shadows, focus, and visual style. Detail is proportional to visible content; unclear or hidden features are identified rather than invented. Identity and other unseen personal attributes are not guessed. Incidental text in a picture does not suppress its visual description. Search terms and URL search fallbacks call web.php, the shared search API, and return a generated search summary with source links/snippets, answer status and warnings. Responses identify search_helper:"web.php". Search success is not answer verification; insufficient or mismatched-date evidence needs a targeted follow-up. Uploads and supported document downloads are limited to 10 MB; oversized non-HTML downloads return an error instead of partial file bytes. Version 3.6 sends successful HTML responses exceeding the 1 MB download limit directly to one search request through web.php unless fallback=off. It discards partial page bytes and returns a labeled search summary with fallback_reason:"resource_too_large", source evidence and a warning. If search is unavailable it returns HTTP 502 with error_kind:"search_fallback_unavailable"; rate limits remain HTTP 429. PDFs are limited to 30 pages per request. Each page is checked separately: usable embedded text is preserved, while pages with images/form objects or unusable text are rendered at 240 dpi (up to 3200 pixels per side, lossless PNG) for OCR in batches of up to three pages. Page boundaries, paragraph breaks, table spacing, and literal characters are retained. OCR responses must finish normally and cover every requested page; failures are errors, never silent partial success. Automatic checks cannot detect every faulty text layer; use pdf_ocr=always to visually transcribe all pages. OCR may misread characters or numbers; verify critical values against the original. Uncertain spans are marked [illegible]. PDF, Office, ebook, plain/structured text, email and feed output defaults to 500,000 characters for URLs and uploads, with explicit caller limits respected. Image output defaults to 500,000 characters, supports an explicit max_chars up to 500,000, and requests up to 32,768 model completion tokens including reasoning; exceptionally dense images may exceed the model output allowance. HTML, media transcripts and search output default to 12,000 characters and are capped at 30,000 for URLs/search or 500,000 for uploads. Direct HTTP reading follows up to 10 redirects, validating each destination. An eleventh redirect returns HTTP 424 with error_kind:"target_redirect_error"; this error does not invoke browser or search fallback. Empty HTML or recognizable JavaScript/loading shells first use browser.php in a new isolated session, with no saved login profile. The reader waits once for 2.5 seconds after navigation and extracts rendered main-page text, then closes its session. Version 3.4 also retries HTTP 403 HTML responses once in an isolated browser, with one 8-second wait for automatic page loading. Successful retries return reader_mode: "browser_text" and browser_fallback.trigger_status: 403. Persistent login or verification challenges return target_access_required; unavailable browser reads preserve the HTTP error. This 403 path does not use search fallback or submit challenges. Short valid pages stay on direct extraction. If browser reading is unavailable or still has no useful text, Tavily is the final search fallback. Search answers may summarize a source rather than reproduce the full page. DOCX preserves paragraphs/tables and includes headers, footers, footnotes, endnotes and comments. PPTX follows presentation slide order and includes speaker notes. XLSX preserves sheet order, cell addresses, shared strings, dates, numeric formatting, booleans, comments, hyperlinks and merged ranges; saved formula results are labeled and never recalculated. EPUB follows the package spine rather than ZIP order. ODT preserves document text, tables and headers/footers. RTF decodes Unicode and escaped text; EML decodes MIME headers and message bodies while listing attachments separately. JSON retains its original values and syntax, including false, null, empty values and large numbers. Plain text and CSV retain line breaks and literal characters; XML is returned as a labeled hierarchy. RSS/Atom include all entries up to the explicit 1,000-entry limit, including Atom link URLs. Office and ebook raster images use embedded-image OCR by default; see document_ocr and coverage warnings below. Legacy binary DOC/XLS/PPT files are explicitly unsupported.

Supply exactly one url containing a public URL or search terms, or one multipart file. Use GET or POST for URLs/search and multipart POST for files. Inspect text, reader_mode, source_type, and truncated. For detailed picture descriptions, supply the image URL itself or upload the picture; no extra option is required. Read both labeled sections from text with reader_mode:"image_description". Both are included automatically, including for document images. Avoid a small max_chars if you need the complete description. A webpage URL reads the page rather than automatically describing its linked pictures. For PDFs also inspect pdf.page_count, pdf.ocr_pages, pdf.blank_pages, and pdf.warnings. Inspect document.extraction_complete and document.warnings for non-PDF documents. Set document_ocr=off when only native Office/ebook text is needed. Submit email attachments separately. Split PDFs exceeding 30 pages into smaller files. OCR can take several minutes; each batch uses one GPT-6 Luna request and inherits provider limits in addition to the reader request limit. The only automatic HTTP-error retry is the single browser attempt for HTML 403 responses. Set fallback=off to disable both browser and search fallback and use direct extraction only. Search terms still perform a search, with a 400-character query cap. Inspect answer_status and sources before relying on a search answer; for time-sensitive questions match the source date and destination timezone. Search queries do not automatically enter the URL browser-rendering fallback.

https://www.promptbox.cn/api/web_read.php  GET POST
NameTypeDescription
urlstringconditionalA public resource URL or natural-language search terms. Recognizable hostnames without a scheme assume https://; search terms automatically use Tavily. Required when file is not supplied.
filefileconditionalOne file sent as multipart/form-data. Maximum 10 MB. Required when url is not supplied; cannot be combined with url.
max_charsintegeroptionalMaximum returned text characters. Default: 500000 for images, PDFs, Office/ebook files, text documents, email and feeds, 12000 otherwise. Minimum: 1000. Maximum: 500000 for images, PDFs, Office/ebook files, text documents, email and feeds (URL or upload), and other uploads, 30000 for other URLs/search answers. Explicit caller limits can truncate any returned text; inspect truncated.
document_ocrstringoptionalauto (default) transcribes embedded raster images in DOCX, PPTX, XLSX, ODT and EPUB. off reads native text only and reports omitted images. Up to 10 image references per document; duplicate image bytes are transcribed once. Supported embedded formats: PNG, JPEG, WebP and GIF (first frame). Image transcriptions are appended after native text with source labels. Each unique supported image uses one GPT-6 Luna OCR request; completion is checked, failures return errors and no automatic retries are performed. Embedded vector graphics, charts and objects require PDF export for visual reading. PDF and standalone image behavior are unaffected.
pdf_ocrstringoptionalauto (default) checks each PDF page and OCRs pages containing images/form objects or unusable embedded text. always OCRs every page, useful for incorrect but apparently readable text layers. Only these two values are accepted; ignored for non-PDF sources.
fallbackstringoptionalSet to off to disable browser rendering and Tavily search fallback for URL extraction. Default: auto. Successful HTML downloads exceeding 1 MB go directly to one search fallback; fallback=off retains HTTP 413. Empty HTML or explicit JavaScript/loading shells try browser rendering before search; other empty readable resource types retain their existing search fallback. Short text alone does not trigger rendering. Explicit search terms still use Tavily with fallback=off. PDF and document extraction errors never become search answers. Uploads and the dedicated YouTube/MSN paths do not use this fallback; target HTTP errors and failed URL validation remain errors.
callbackstringoptionalJSONP callback for GET requests. cb is also accepted.

Returns application/json. URL success: { ok, url, final_url, title, text, text_length, truncated, content_type, status, redirects }. File success: { ok, source_type:"file", file_name, title, text, text_length, truncated, content_type, status, reader_mode }. Search success: { ok, source_type:"web_search", query, title, text, text_length, truncated, content_type, status, reader_mode:"web_search" }. A search fallback retains url, final_url, and redirects, adds source_type:"web_search", and uses reader_mode:"web_search_fallback". These results are Tavily search answers, not guaranteed full-page extraction. Search terms use the reader’s 400-character query cap and shared web rate limits; unavailable answers return HTTP 502 for search requests, and upstream rate limits propagate HTTP 429 with Retry-After when supplied. Reader modes include html_text, browser_text for rendered webpage text, document_text, pdf_text for embedded PDF text, pdf_ocr for fully OCR-read PDFs, pdf_mixed for combined embedded-text and OCR pages, archive_document_text, feed_text, youtube_transcript, image_description, media_transcript, web_search, web_search_fallback, and msn_article_json. Errors return { ok:false, error, error_kind, target_status? }. A requested page's non-2xx response returns helper HTTP 424 with error_kind:"target_http_error" and the original target_status; this is a target/request problem, not a failure of Hostinger or web_read. Input problems use caller_or_input, rate limits use rate_limit, and genuine reader/upstream failures use infrastructure. JSONP applies only to GET URL/search requests.

PDF success also includes pdf: { page_count, ocr_pages, text_pages, blank_pages, extraction_complete, warnings }. Page numbers are one-based. extraction_complete:true means every page completed extraction before the caller's character limit; it is not a guarantee of recognition accuracy. truncated:true means the returned text was shortened by max_chars. text_length retains its existing UTF-8 byte-count meaning. Blank/non-text pages appear as Page N followed by [No readable text]. PDF errors include HTTP 413 (pdf_page_limit or resource_too_large), 422 (pdf_invalid, pdf_render_failed, pdf_unreadable), 502/504 (pdf_ocr_incomplete), or 503 for unavailable OCR/rendering. Encrypted/damaged PDFs that cannot be read are rejected. No legacy font-blind extraction or unverified whole-document OCR fallback is used.

Office, ebook, email, RTF, text and feed responses add document: { format, extraction_complete, warnings, units?, embedded_images?, entries? }. units counts sheets, slides, EPUB spine sections, or one main DOCX/ODT document. embedded_images counts discovered image references, not necessarily unique images or completed OCR calls. extraction_complete:false indicates known skipped content or missing formula results; true means no known omission was detected, not guaranteed visual fidelity. Shape reading order, automatic list numbering, equation layout, master/layout text, embedded charts/objects and complex RTF font mappings are not fully reconstructed. Email attachments and remote linked resources are not fetched. Some apparently readable text may still be wrong; export complex layouts to PDF for visual reading. Encrypted or damaged archives, invalid JSON/XML/RTF and ambiguous text encodings return HTTP 422 (document_invalid); legacy binary Office formats return 415 (document_unsupported). Text accepts UTF-8, BOM-marked UTF-16/32, and supported declared charsets; undeclared non-UTF-8 text must be converted to UTF-8. XML custom entities and document-type declarations are rejected. Archive limits: 10,000 entries, 20 MB per expanded part, 50 MB expanded total; XLSX permits up to 100,000 stored cells. These limits and the 10-image/1,000-feed-entry limits return HTTP 413 (document_limit), never silent partial output. Embedded-image OCR failures return HTTP 502/504 (document_ocr_incomplete). Native document text is not sent to a model; embedded images are sent only when OCR is enabled.

Browser success retains URL metadata and adds reader_mode:"browser_text", source_type:"url", browser_fallback:{attempted:true,status:"ready"}, and warnings. If search follows an unsuccessful browser attempt, browser_fallback.status is unavailable or no_readable_content. Rendered text honors the normal URL character limit (12,000 default, 30,000 maximum), with Unicode-aware truncated reporting. Rendering captures one snapshot without clicking, scrolling or filling forms; later-loaded and embedded-frame content may be absent. Recognized login/verification pages return HTTP 422 with error_kind:"target_access_required"; they are not bypassed or replaced with search answers. Initial non-2xx target responses and PDF/document extraction errors remain errors. Browser rendering uses the server's existing private credential, shares browser quota/capacity, and normally consumes three operations (create, read, close). No existing session or saved profile is selected. Navigation and cleanup use fixed timeouts; if cleanup cannot be confirmed, idle expiry applies. The browser helper's own bounded navigation recovery policy still applies; web_read does not retry browser calls.

Search and search-fallback responses add answer_type:"generated_search_summary", answer_status:"unverified"|"insufficient_evidence", sources:[{url,title,snippet,published_date}], retrieved_at, query_truncated and warnings. The reader calls web.php with format=json for one advanced Tavily search with up to five results and retains source snippets of at most 2,000 characters each. It shares the existing web search credentials and rate limits. Advanced search uses two provider credits; it does not guarantee a matching dated forecast. ok:true confirms successful retrieval, not a verified answer. Missing-evidence detection is a conservative text heuristic; all other generated summaries remain unverified. Source timestamps may be absent, and retrieval time must not be treated as the source's date. max_chars limits the answer text; the separately bounded source snippets remain available for follow-up. For weather and other current facts, inspect a dated source matching the requested location and date rather than treating averages or another day's conditions as the answer.

# Read one exact page GET web_read.php?url=https://www.promptbox.cn/index.html&max_chars=8000 # Search terms automatically use Tavily GET web_read.php?url=ABC+store+opening+hours # Disable URL extraction fallback (search terms still work) GET web_read.php?url=https://example.com/article&fallback=off # Read a PDF with extractable text GET web_read.php?url=https://www.promptbox.cn/datacenters.pdf # Read a public YouTube transcript GET web_read.php?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ # Read GitHub source, feeds, images, or media GET web_read.php?url=https://github.com/user/repo/blob/main/file.js GET web_read.php?url=https://example.com/feed.xml GET web_read.php?url=https://example.com/photo.jpg GET web_read.php?url=https://example.com/interview.mp3 # POST JSON POST web_read.php Content-Type: application/json { "url": "https://www.promptbox.cn/index.html", "max_chars": 12000 } # Upload one local PDF, JSON, Office document, image, or media file curl -F "file=@report.pdf" -F "max_chars=500000" https://www.promptbox.cn/api/web_read.php # Read a workbook without embedded-image OCR curl -F "file=@report.xlsx" -F "document_ocr=off" https://www.promptbox.cn/api/web_read.php # Visually transcribe every PDF page curl -F "file=@report.pdf" -F "pdf_ocr=always" https://www.promptbox.cn/api/web_read.php

youtube.php

YouTube search + transcript AI synthesis

Searches YouTube, reads available captions from up to five relevant videos, and returns an answer based on those transcripts. Choose it to research a question across videos; use transcript.php for captions from one known video. Videos without accessible captions are skipped. Transcript synthesis uses the default llm.php route (currently glm-5.3), including one local Qwen fast fallback if Z.ai fails or reaches its upstream quota. If both providers fail, the error preserves both causes.

Send a question in prompt by GET or POST and read the JSON content answer. If no usable videos or captions are available, inspect the error and offer an explicit later retry. Do not poll.

https://www.promptbox.cn/api/youtube.php  GET POST
NameTypeDescription
promptstringrequiredThe question or topic to research. Also accepted as q.
{ "success": true, "content": "AI-synthesized answer from video transcripts..." }

Returns an error if no videos are found, none have accessible transcripts, a dependency key is missing, or the helper hits its rate limit. GET also supports JSONP with callback or cb.

# Simple GET GET youtube.php?prompt=How+do+black+holes+form # POST with JSON body POST youtube.php Content-Type: application/json { "prompt": "What are the best stretches for lower back pain?" }