PineRouterDocs
GuidesModelsAPI referenceApps

Start a job

POST
/v1/jobs

Authorization

BearerAuth

AuthorizationBearer <token>

Authorization: Bearer sk-...

In: header

Request Body

application/json

model*string

Model id from the Models page.

input*

The model's fields, as listed on its page.

webhook_url?string

Optional public https URL. When the job succeeds or fails we POST the job to it, signed per the Standard Webhooks spec (webhook-id, webhook-timestamp, webhook-signature: HMAC-SHA256 with your API key as the secret). Retried after 1, 5, 15 and 60 minutes.

Formaturi

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://pinerouter.ai/v1/jobs" \  -H "Content-Type: application/json" \  -d '{    "model": "z-image",    "input": {      "prompt": "A red paper boat on a calm lake",      "aspect_ratio": "1:1"    }  }'
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "task_abc123",
    "status": "queued",
    "taskId": "string",
    "state": "string"
  }
}
{
  "code": 400,
  "msg": "string"
}
{
  "error": {
    "code": "",
    "message": "Invalid token (request id: 20261102053704107200635868d9d6m7EOL5JK)",
    "type": "api_error"
  }
}
{
  "code": 403,
  "msg": "This token has no access to model z-image",
  "data": null
}
{
  "error": {
    "code": "",
    "message": "You have reached the request limit: maximum 60 requests in 1 minutes (request id: 20261102053704107200635868d9d6m7EOL5JK)",
    "type": "api_error"
  }
}
{
  "code": 500,
  "msg": "Task request failed",
  "data": null
}