Create an analysis
/api/sdk/v1/analysesStarts an agent run over the named contents, the user's earlier
contents, or both. Accepted work is returned immediately with
state: "queued"; follow it with the event stream or by re-reading the
analysis.
mode: "ai" requires an active Pro subscription. mode: "direct"
shows one uploaded PNG or JPEG without AI and is available on every
plan.
Omitting target asks the agent to choose the displays — which needs
at least one usable display on the account, or the request is refused
with 422 no_compatible_display before anything is created.
Authorization
bearerAuth A personal access token created in the inklet portal. Server-side use only.
In: header
Header Parameters
8–128 printable ASCII characters without spaces. Required. Replaying a
key with the same body returns the original response verbatim; reusing
it with a different body is 409 idempotency_conflict, and reusing it
while the first call is still in flight is 409 invalid_state. Keys
are remembered for 24 hours, and a rejected request releases its key.
^[!-~]+$8 <= length <= 128Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/sdk/v1/analyses" \ -H "Idempotency-Key: stringst" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "mode": "ai", "trigger": "api", "state": "queued", "outcome": "presentations", "noChangeReason": "string", "contentIds": [ "string" ], "context": "submitted", "scope": { "since": "string", "sinceAt": "2019-08-24T14:15:22Z" }, "intent": "string", "title": "string", "target": { "displayId": "string", "displayIds": [ "string" ], "output": { "formats": [ "scene" ], "preset": "string", "viewport": { "width": 1, "height": 1 }, "colorMode": "color", "pixelRatio": 1 } }, "presentationIds": [ "string" ], "failure": { "code": "string", "message": "string", "stage": "string", "retryable": true, "assetIndex": 0 }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}