# starryai creative jobs

Use the A2A 1.0 JSON-RPC interface at `https://starryai.com/api/a2a`. Send POST requests with `Content-Type: application/json` and `A2A-Version: 1.0`. Public quotes display the current Lumen price and each planned output. A quote, revision, or status check spends zero Lumens.

## Get a quote

Send one JSON data part. Use a unique message ID for each new brief. Retrying that message with the same creator and OAuth client returns the same task.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "SendMessage",
  "params": {
    "message": {
      "role": "ROLE_USER",
      "messageId": "coffee-launch-001",
      "parts": [{"data": {
        "skill": "reel-footage",
        "brief": "Follow the coffee beans from the roaster to the espresso cup.",
        "model": "Nova Ultra",
        "durationSeconds": 120
      }}]
    }
  }
}
```

For a quick comparison of all three jobs, send `{"action":"options","maxLumens":100}` as the data part. Signed-in comparisons also show the creator's balance. Any brief can include `maxLumens`. A quote above that budget must be revised before generation.

| Skill | Inputs and deliverables |
| --- | --- |
| `product-photo-pack` | Supply a product photo and an optional `brief`. The pack contains a square shop image, a 4:5 lifestyle image and a 9:16 launch image. Set `quality` to `standard`, `better`, or `best`. Customize `directions.shop`, `directions.lifestyle`, or `directions.vertical`. The first approval pays for the shop image. Show it to the creator and obtain approval for the remaining two, which use that image as their reference. |
| `reel-footage` | Specify `brief`, `durationSeconds`, and optionally `model`. Nova Ultra supports 3–15 seconds per scene and a selectable `resolution`. Nova Veo makes 8-second clips. The quote covers at most 20 new shots. An optional owned `sourceCreationId` reuses the measured opening and extends it when eligible. Set `extendOpening` to false to keep the original clip, `extensionPrompt` to direct a continuation, and `shotPrompts` to supply one prompt per new scene. Generation requires Pro. Results include downloadable clips and an ordered edit list with timeline positions for assembly. |
| `youtube-thumbnail-set` | Supply a `title`, optional `headline`, art direction in `brief`, and optional reference photo. The quote lists enabled layout IDs under `availableLayouts`. Set `layouts` to your choices and `count` to the desired number of 16:9 thumbnails. Approving runs the existing YouTube thumbnail recipe. |

For a photo, provide a starryai-hosted `imageUrl` in the brief or send `imageBase64` on the first approval. A product pack requires one photo. Thumbnails can also be made from a title alone.

## Connect and approve

Use authorization code with S256 PKCE, the resource `https://starryai.com/api/a2a` and scope `creator.tools`. Discover the issuer at `https://starryai.com/.well-known/oauth-protected-resource/api/a2a`. Send the resulting bearer token on each private request. Re-send the brief after connecting to obtain an approvable task. Account balances, owned clips, saved quotes and output links belong to that creator and client.

Read `result.task.id`, `contextId`, and `status.message.parts[0].data`. Show the line items, the total, and the amount for the current phase. After the creator agrees, send a new `SendMessage` with the task ID and context ID in the message and the displayed `action`, `approvalId` and exact `approvedLumens` in its data part. Lumens are charged by the existing generation tools to the connected creator. Replay the same approval after a lost response.

When the task reports `nextAction: checkout`, explain its `billingRequirement` and share the supplied link. A Pro subscription unlocks Pro tools. A one-time Lumen pack tops up the existing balance. Show the shortfall when one is returned. Ask the creator to finish checkout on the same starryai account, then poll the same task. If Pro was required, check the refreshed balance before suggesting a pack. A quote above the creator’s spending limit calls for revising the brief or budget. When the requirement clears, confirm the quoted generation with the creator and follow the task’s approval or continuation instructions.

To change a quote, send `{"action":"revise","approvalId":"<current ID>","changes":{"count":2}}` on the task (for a thumbnail set). Review the returned price and use the new approval ID. At product preview, you can revise the remaining directions or budget. Send `CancelTask` with `{"id":"<task ID>"}` to decline a quote or the rest of a product pack.

## Retrieve and continue a job

Poll `GetTask` with `{"id":"<task ID>"}`. During video generation, wait for each clip to finish. When status data gives `nextAction: "continue"`, send a new `SendMessage` on the same task with `{"action":"continue"}`. This starts the next already-approved clip. Honor `retryAfterSeconds` when present. If `resumeWithOriginalImage` is true, replay the original approval with its image. A status check alone never starts another generation.

The product preview returns `TASK_STATE_INPUT_REQUIRED` and its first image as an artifact. Display the image before sending the separate `approvePreview` decision. Completed tasks return media URLs in `artifacts`. The reel’s final artifact records clip order, planned runtime, and the assembled duration. Check `generationJobs` and any error on a failed task to see which jobs were accepted. If a submission cannot be confirmed, inspect the creator's library before starting a new one.

Use `ListTasks` to recover the connected client's jobs. Tasks are kept for seven days after their last update.
