Legacy site:old.problembo.app
API Documentation

Prompt Enhancement API

How to synchronously enhance image and video generation prompts through the Problembo Client API, pass image inputs, and handle errors.

The Client API provides two operations:

  • POST /apis/v1/client/prompt-enhance/image — enhances one image-generation prompt
  • POST /apis/v1/client/prompt-enhance/video — enhances one or more video-generation prompts

Both operations are synchronous: a successful response contains the enhanced text immediately. Unlike image or video generation, these endpoints do not return a taskId and do not require task-status polling.

Authentication and base URL

Use an API token from your account:

Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

Base URL:

https://problembo.com/apis/v1/client

Pricing and execution order

OperationPrice per request
Image prompt enhancement$0.007
Video prompt enhancement$0.016

The server fully validates the payload, model availability, and input files before charging the account and calling the LLM.

Repeating the same request creates a new paid operation. These endpoints do not provide an idempotency key, so do not automatically retry without checking the outcome of the previous request.

Choosing modelId

Pass the public identifier of an available model from the corresponding Problembo catalog. You can copy it from the API JSON request shown in the image generator or video generator interface.

Unavailable, coming-soon, disabled, and admin-only models are rejected. Do not send an internal enhancement-profile field: the API automatically selects the model-specific profile when one exists and otherwise uses the default profile.

Enhancing an image prompt

Request fields

FieldTypeRequiredDescription
modelIdstringyesPublic ID of an available image-generation model
originalPromptstringyesNon-empty source prompt, up to 2,000 characters

Unknown fields are rejected.

Request example

curl 'https://problembo.com/apis/v1/client/prompt-enhance/image' \
  -X POST \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "modelId": "image-gpt-v3",
    "originalPrompt": "portrait of a woman in a city at night"
  }'

Successful response

{
  "enhancedPrompt": "A cinematic portrait of a woman in a neon-lit city at night..."
}

Enhancing video prompts

Request fields

FieldTypeRequiredDescription
modelIdstringyesPublic ID of an available video-generation model
originalPromptsstring[]yesAt least one source prompt, each up to 2,000 characters
targetPromptCountintegeryesPositive number of prompts expected in the response
segmentDurationSecondsintegerfor multi-segmentPositive segment duration supported by the model
imageInputsPromptImageInput[]noFirst/last frames or reference images

If originalPrompts contains more than one item, its length must equal targetPromptCount. Most video models support only 1 → 1; multi-segment requests are accepted only by models that expose this capability in the catalog.

1 → 1 request example

curl 'https://problembo.com/apis/v1/client/prompt-enhance/video' \
  -X POST \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "modelId": "momentflow_v5",
    "originalPrompts": [
      "the camera slowly moves toward a car in the rain"
    ],
    "targetPromptCount": 1,
    "segmentDurationSeconds": 5,
    "imageInputs": [
      {
        "role": "first_frame",
        "file": {
          "url": "https://example.com/car-first-frame.jpg"
        }
      }
    ]
  }'

Successful response

The response always contains exactly targetPromptCount items:

{
  "enhancedPrompts": [
    "A cinematic rainy-night shot: the camera glides steadily toward the car..."
  ]
}

Multi-segment example

The wildclips_v3.6 model supports up to five 5-second segments:

{
  "modelId": "wildclips_v3.6",
  "originalPrompts": ["a silver car drives along a winding mountain road"],
  "targetPromptCount": 3,
  "segmentDurationSeconds": 5,
  "imageInputs": [
    {
      "role": "first_frame",
      "file": {
        "fileId": "910e1b85-4677-49d4-abd3-41218733ab60.jpg"
      }
    }
  ]
}

In this scenario, the server expands one source idea into three sequential prompts and returns a three-item array.

Video image inputs

Each imageInputs item has this shape:

{
  "role": "first_frame",
  "file": {
    "fileId": "910e1b85-4677-49d4-abd3-41218733ab60.jpg"
  }
}

Supported public roles:

  • first_frame — first frame
  • last_frame — last frame
  • reference — reference image

The nested file object must contain exactly one field:

  • fileId — an active file owned by the API-token account
  • url — a public direct http/https URL; the server imports it before prompt enhancement

Do not send fileId and url together. To upload a local or private file in advance, use the Client API upload flow.

The selected model further restricts supported roles and counts:

  • at most one first_frame and one last_frame are accepted
  • last_frame requires first_frame
  • frame inputs and reference inputs cannot be mixed
  • the maximum number of reference inputs depends on the model

Current machine-readable contracts

Fetch the current field descriptions directly from the Client API:

curl 'https://problembo.com/apis/v1/client/api-contracts/prompt-enhance-image'
curl 'https://problembo.com/apis/v1/client/api-contracts/prompt-enhance-video'

Contract IDs:

  • prompt-enhance-image
  • prompt-enhance-video

To validate your payload and receive a normalized endpoint example, send it to POST /apis/v1/client/api-contracts/{contractId}/example as the request body.

Errors

HTTPReturned when
400Invalid payload, model, or file; unsupported field combination; insufficient balance
401API token is missing, invalid, disabled, or expired
429The shared Client API rate limit is exceeded
500Billing infrastructure fails
502The prompt-enhancement provider cannot complete the request

400 responses use the standard Client API envelope. For insufficient balance, inspect errorKey:

{
  "type": "msgType_error",
  "errorKey": "BILLING_ACCESS_DENIED",
  "translationKey": "common:server.BILLING_ACCESS_DENIED",
  "translationValues": {}
}

The rate limit is shared by all /apis/v1/client/** endpoints: 60 requests per minute per API token, plus an independent limit of 120 requests per minute per IP. On 429, respect the Retry-After header. The response body is:

{
  "error": "rate_limit_exceeded"
}

Last updated: July 18, 2026