PicoBerry API + MCP정식 출시

API Reference

API overview

Programmatic access to PicoBerry generation and asset endpoints.

Base URL

https://api.picoberry.ai

All endpoints are versioned under /v1. The API accepts JSON (and multipart/form-data where files are uploaded), returns JSON, and uses standard HTTP status codes.

Authentication

Every request authenticates with an API key, sent in either header:

Authorization: Bearer pb_live_xxxxxxxxxxxx
x-api-key: pb_live_xxxxxxxxxxxx

The API is available to paying customers — see Authentication.

Response format

Every response is wrapped in a { success, data } envelope:

{ "success": true, "data": { /* ... */ } }

Errors return success: false with an error object:

{
  "success": false,
  "error": {
    "code": 1001,
    "message": "Missing API key. Send \"Authorization: Bearer pb_...\" or \"x-api-key\" header.",
    "httpStatus": 401
  }
}
StatusMeaning
400Validation error — bad/missing parameter, unsupported model/image.
401Missing, invalid, or revoked API key (code 1001).
403Account not entitled to the API, or insufficient credits.
404Asset/collection not found, or not owned by your account.
429Rate limit exceeded (code 10003).

Async generation pattern

Generation is asynchronous. A create call returns immediately with an asset id and taskStatus: 0; you then poll or await a webhook.

  1. POST /v1/images (or /v1/models/from-text, /v1/models/from-image, …) returns { "id": "019...", "taskStatus": 0 }.
  2. Poll GET /v1/assets/{id} until taskStatus is 2 (succeeded) or 3 (failed).
  3. On success, the output URLs are in files (short-lived signed URLs).

taskStatus values:

ValueMeaning
0Queued
1Processing
2Succeeded
3Failed

Poll on a sensible interval (e.g. every 3–5 s) with backoff, or register a callbackUrl to be pushed the result. A 3D generation typically takes a few minutes; an image, a few seconds.

Rate limits

LimitScopeOn exceed
240 req / minper client IP429 with error.code: 10003
120 req / minper user (generation POSTs)429 with error.code: 10003

There is no per-request idempotency key yet — retry a create call only when you didn't receive a response, or you may produce a duplicate generation.

Credits

Generation spends credits from your unified wallet. Credits are deducted when a job is accepted and automatically refunded if generation fails. Fetch your live balance with GET /v1/credits; per-model cost is listed by GET /v1/models.