Gensprite
Jobs

Create a job

POST
/v1/jobs

Charges credits and starts a generation. The charge and the job row are written in one transaction: there is no state in which credits are gone and no job exists.

Idempotency-Key is required, not optional. The plugin runs inside a desktop editor where a dropped connection is routine, and a retry without a key buys the same generation twice. The key is recorded before the provider is called, so a retry that races the original still returns the first job. Repeating a key returns the original job and the same 200.

Authorization

AuthorizationBearer <token>

API key: Authorization: Bearer gsk_.... Used by the Godot plugin, the MCP server and the engine.

In: header

Header Parameters

Idempotency-Key*string

Client-generated unique string. Reusing one returns the job it first created.

Length1 <= length <= 255

Request 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

curl -X POST "https://example.com/v1/jobs" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "kind": "sprite",    "input": {      "property1": null,      "property2": null    }  }'
{  "id": "string",  "kind": "sprite",  "status": "queued",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "progress": 0,  "model": "string",  "cost": {    "tokens": 0  },  "input": {    "property1": null,    "property2": null  },  "files_expired": true,  "output": {    "files": [      {        "role": "string",        "url": "http://example.com",        "content_type": "string"      }    ]  },  "error": {    "code": "invalid_request",    "message": "string",    "details": {      "property1": null,      "property2": null    }  }}