ข้ามไปยังเนื้อหาหลัก
Apidly Cloud
นโยบายคุกกี้

คุกกี้เพื่อการวิเคราะห์และการโฆษณาจะปิดอยู่จนกว่าคุณจะยอมรับ นโยบายคุกกี้

เราต้องการใช้ Google Analytics และ Microsoft Clarity เพื่อทำความเข้าใจว่าหน้าสาธารณะถูกใช้งานอย่างไร รวมถึงการเข้าชมหน้าและการบันทึกเซสชัน และใช้ Reddit Pixel เพื่อวัดว่าโฆษณาของเราบน Reddit นำไปสู่การเข้าชมและการสมัครใช้งานหรือไม่ คุณเลือกที่นี่ว่าจะเปิดใช้งานหรือไม่ การปฏิเสธไม่ทำให้การทำงานของเว็บไซต์เปลี่ยนไป

เอกสารอ้างอิง API: เอนด์พอยต์แบบไร้เซิร์ฟเวอร์

การดำเนินการของ API v1 สำหรับ เอนด์พอยต์แบบไร้เซิร์ฟเวอร์: สโคป พารามิเตอร์ ตัวอย่างใน curl, JavaScript และ Python และผลลัพธ์

อัปเดตล่าสุด 21 พฤศจิกายน 2569อ่าน 37 นาที
ดูเป็น Markdown

เอนด์พอยต์แบบไร้เซิร์ฟเวอร์: ทุกการดำเนินการของ API v1 พร้อมสโคปที่ต้องใช้ พารามิเตอร์ ตัวอย่างใน curl, JavaScript และ Python และผลลัพธ์ที่ได้ การยืนยันตัวตน ข้อผิดพลาด การแบ่งหน้า ขีดจำกัด และ idempotency อยู่ในภาพรวมเอกสารอ้างอิง API ดูเพิ่มเติมที่ SDK และบรรทัดคำสั่ง

ลองใช้กับคีย์ของคุณ: สร้างคีย์ API ในคอนโซล รัน export APIDLY_API_KEY=... ในเทอร์มินัล แล้ววางตัวอย่าง curl ด้านล่าง ค่าในตัวอย่างเป็นเพียงภาพประกอบ หน้านี้ไม่มีช่องให้กรอกคีย์

คำอธิบายของการดำเนินการและฟิลด์มาจากนิยามของ API และเป็นภาษาอังกฤษ

การดำเนินการ สโคปที่ต้องใช้ สรุป
GET /endpoints read เอนด์พอยต์แบบ serverless
POST /endpoints full สร้างเอนด์พอยต์
GET /endpoints/{id} read เอนด์พอยต์หนึ่งรายการพร้อม worker และเหตุการณ์การปรับขนาดล่าสุด
PATCH /endpoints/{id} full เปลี่ยนการตั้งค่าการปรับขนาดของเอนด์พอยต์
DELETE /endpoints/{id} full ลบเอนด์พอยต์ (คำขอหยุดทันที worker จะถูกปล่อยภายในไม่กี่นาที)
POST /endpoints/{id}/{action} full หยุดชั่วคราว (ปฏิเสธคำขอ ปล่อย worker) หยุด (ปฏิเสธคำขอ คง worker ไว้ในสถานะหยุด) หรือกลับมาทำงานต่อของเอนด์พอยต์
POST /endpoints/{id}/rollout full ทำต่อ ยกเลิก เริ่มใหม่ หรือย้อนกลับการอัปเดตแบบทยอยของเอนด์พอยต์
GET /endpoints/{id}/groups read กลุ่ม worker ของเอนด์พอยต์
PUT /endpoints/{id}/groups full แทนที่กลุ่ม worker ของเอนด์พอยต์
GET /endpoints/{id}/metrics read Requests, jobs, queue wait, execution time, workers, cold starts and cost over time
GET /endpoints/{id}/proxy/{...path} read ส่งต่อ GET ไปยัง worker ที่พร้อม (เช่น /v1/models)
POST /endpoints/{id}/proxy/{...path} servers ส่งต่อคำขอไปยัง worker ที่พร้อมและสตรีมคำตอบกลับ
GET /endpoints/{id}/openai/v1/{...path} read URL ฐานแบบ OpenAI: GET /v1/... ไปยัง worker ที่พร้อม (เช่น /models)
POST /endpoints/{id}/openai/v1/{...path} servers URL ฐานแบบ OpenAI: POST /v1/... ไปยัง worker ที่พร้อม (chat/completions, completions, embeddings)
GET /endpoints/{id}/jobs read งานแบบอะซิงโครนัสล่าสุดของเอนด์พอยต์
POST /endpoints/{id}/jobs servers ใส่งานแบบอะซิงโครนัสเข้าคิว (คำขอสูงสุด 1 MB)
GET /endpoints/{id}/jobs/{jobId} read สถานะของงานหนึ่งรายการ พร้อมคำตอบเมื่อเสร็จ
POST /endpoints/{id}/jobs/{jobId}/cancel servers ยกเลิกงานที่ยังไม่เสร็จ
POST /endpoints/{id}/jobs/{jobId}/retry servers ส่งงานที่ล้มเหลว ถูกยกเลิก หรือหมดอายุอีกครั้งเป็นงานใหม่
POST /endpoints/{id}/jobs/purge full ยกเลิกงานทั้งหมดที่ยังรอ worker
GET /endpoints/{id}/health read สรุปสถานะของ endpoint
GET /endpoints/{id}/requests read บันทึกรายคำขอ (เก็บไว้ 7 วัน ใหม่สุดก่อน)
GET /endpoints/{id}/logs read Recent log lines of every worker, or of one
GET /endpoints/{id}/jobs/{jobId}/logs read Log tail of the worker that ran a job
GET /endpoints/{id}/presets read Scaling presets with their hourly cost
POST /endpoints/{id}/presets full Apply a scaling preset
GET /endpoints/{id}/releases read Past configurations of an endpoint
POST /endpoints/{id}/releases/{version}/restore full Restore an earlier release (rollback)

GET /endpoints

เอนด์พอยต์แบบ serverless

Workers are ordinary servers billed by the second like any server, from the moment they start until they are released; there is no per-request price. Available only when serverless endpoints are switched on for the account (404 feature_unavailable otherwise).

สโคปที่ต้องใช้: read

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.list();

Python (SDK)

client.endpoints.list()

เครื่องมือบรรทัดคำสั่ง: apidly endpoints, apidly export, apidly plan, apidly apply (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoints": [
    {
      "id": "example",
      "name": "example",
      "planId": "id_example",
      "templateId": "id_example",
      "diskGb": 1,
      "envKeys": [
        "example"
      ],
      "constraints": {
        "key": null
      },
      "status": "active",
      "pausedReason": "example",
      "pausedAt": "2026-11-21T10:00:00.000Z",
      "lastRequestAt": "2026-11-21T10:00:00.000Z",
      "url": "https://example.com/hook",
      "httpPort": 1,
      "healthPath": "example",
      "apiKind": "openai",
      "minWorkers": 1,
      "maxWorkers": 1,
      "idleSeconds": 1,
      "targetConcurrency": 1,
      "startupSeconds": 1,
      "coldStartNote": "example",
      "maxHourlySpendMicros": "1000000",
      "maxHourlySpendUsd": "1.000000",
      "monthlySpendCapMicros": "1000000",
      "monthlySpendCapUsd": "1.000000",
      "resumeAtNewMonth": false,
      "releaseStoppedAtCap": false,
      "desiredWorkers": 1,
      "minWarmWorkers": 1,
      "warmPercent": 1,
      "desiredWarm": 1,
      "maxQueueSeconds": 1,
      "targetQueueSeconds": 1,
      "fallbackPlanIds": [
        "example"
      ],
      "rollout": {
        "state": null,
        "startedAt": null,
        "finishedAt": null,
        "total": null,
        "replaced": null,
        "reasonCode": null,
        "reason": null,
        "canRollBack": null,
        "automatic": null
      },
      "rolloutMaxSurge": 1,
      "autoRollback": false,
      "rateLimitPerMinute": 1,
      "perfByPlan": {
        "key": {
          "perf": null,
          "samples": null,
          "at": null
        }
      },
      "jobMode": "sync",
      "jobTimeoutSeconds": 1,
      "openaiBaseUrl": "https://example.com/hook",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "activeWorkers": 1,
      "readyWorkers": 1
    }
  ]
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints

สร้างเอนด์พอยต์

Workers are ordinary servers billed by the second like any server, from the moment they start until they are released; there is no per-request price. Available only when serverless endpoints are switched on for the account (404 feature_unavailable otherwise). Workers are requested by the same rules as a manual server (approval, balance, price).

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin · ลองซ้ำได้อย่างปลอดภัยด้วย: Idempotency-Key

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
name string ไม่ Endpoint name. Required for a manual setup.
planId string ไม่ Required for a manual setup.
templateId string ไม่ Required for a manual setup.
diskGb integer ไม่ Required for a manual setup.
env object ไม่
constraints object ไม่
httpPort integer ไม่
healthPath string ไม่
minWorkers integer ไม่
maxWorkers integer ไม่
idleSeconds integer ไม่
targetConcurrency integer ไม่
startupSeconds integer ไม่
coldStartNote string ไม่
maxHourlySpendUsd number หรือ null ไม่
monthlySpendCapUsd number หรือ null ไม่ Hard spending cap per UTC month in US dollars (0.01-100000), on what the ledger charged for this endpoint's workers. Checked every minute: at the cap the endpoint pauses itself (pausedReason: "spend_cap"), releases its workers and mails the owner; resuming answers 409 spend_cap_reached until the cap is raised or removed or a new month starts. Charges are posted as usage is metered, so the month can end up to a few minutes of the workers' price above the cap. Null (default) = no monthly cap. Left out on create: the platform's default cap for new endpoints, if one is set (the answer's monthlySpendCapFromDefault is then true); send null for no cap.
resumeAtNewMonth boolean ไม่ When the endpoint was paused by its monthly spending cap (pausedReason: "spend_cap"): true = resume it by itself when a new UTC month starts below the cap (the owner is mailed and an event is written); false (default) = it stays paused until someone resumes it. An endpoint paused for any other reason (balance, failures, by a person, by staff) is never resumed by this.
releaseStoppedAtCap boolean ไม่ The monthly cap pauses an active endpoint and releases its workers, but it does not pause a stopped endpoint, whose stopped workers' disks (and model cache) keep billing. true = at the cap the stopped workers are released too, so spending truly stops (the next start is a cold one); false (default) = they are kept. spendCap.afterCap in the endpoint detail shows what keeps charging.
minWarmWorkers integer ไม่
warmPercent integer ไม่
maxQueueSeconds integer ไม่
targetQueueSeconds integer ไม่
fallbackPlanIds อาร์เรย์ของ string ไม่
jobMode sync | kit ไม่
jobTimeoutSeconds integer ไม่
rolloutMaxSurge integer ไม่
autoRollback boolean ไม่ Roll back to the earlier setup by itself when a worker on the new setup fails its health check during a rolling update (3 failed checks in a row after its start-up time, or not healthy within it). Default false: the update pauses and waits for you.
rateLimitPerMinute integer หรือ null ไม่ Proxy requests per minute for this endpoint, all keys together (1-1200). Null (default) keeps the platform limit of 1200; a value can only lower it. Over it the answer is 429 rate_limited with Retry-After and X-RateLimit-*.

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","planId":"id_example","templateId":"id_example"}'

JavaScript (SDK)

await apidly.endpoints.create({
  name: "example",
  planId: "id_example",
  templateId: "id_example"
});

Python (SDK)

client.endpoints.create(body={
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
})

เครื่องมือบรรทัดคำสั่ง: apidly endpoints, apidly apply (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (201)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  },
  "monthlySpendCapFromDefault": false
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 409, 429, 503.

GET /endpoints/{id}

เอนด์พอยต์หนึ่งรายการพร้อม worker และเหตุการณ์การปรับขนาดล่าสุด

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.get("endpoint_example");

Python (SDK)

client.endpoints.get("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  },
  "workerHourlyMicros": "1000000",
  "workerHourlyUsd": "1.000000",
  "spendCap": {
    "capMicros": "1000000",
    "capUsd": "1.000000",
    "usedMicros": "1000000",
    "usedUsd": "1.000000",
    "remainingMicros": "1000000",
    "remainingUsd": "1.000000",
    "percentUsed": 1,
    "reached": false,
    "month": "example",
    "afterCap": {
      "stoppedWorkers": 1,
      "hourlyMicros": "1000000",
      "hourlyUsd": "1.000000",
      "diskHourlyMicros": "1000000",
      "diskHourlyUsd": "1.000000",
      "modelCacheHourlyMicros": "1000000",
      "modelCacheHourlyUsd": "1.000000",
      "keepsCharging": false,
      "releaseStoppedWorkers": false
    }
  },
  "directMode": false,
  "workers": [
    {
      "id": "example",
      "kind": "deployment",
      "label": "example",
      "status": "example",
      "ready": false,
      "inFlight": 1,
      "requests": 1,
      "lastProbeAt": "2026-11-21T10:00:00.000Z",
      "readyAt": "2026-11-21T10:00:00.000Z",
      "startProgress": {
        "stage": "downloading_image",
        "minutes": 1,
        "elapsedMinutes": 1,
        "percent": 1,
        "message": "example"
      },
      "warm": false,
      "outdated": false,
      "draining": false,
      "planId": "id_example",
      "perf": 1,
      "hourlyPriceMicros": "1000000",
      "hourlyPriceUsd": "1.000000",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "directUrl": "https://example.com/hook"
    }
  ],
  "groups": [
    {
      "id": "example",
      "implicit": false,
      "name": "example",
      "position": 1,
      "minWorkers": 1,
      "maxWorkers": 1,
      "maxPriceMicros": "1000000",
      "maxPriceUsd": "1.000000",
      "activeWorkers": 1,
      "readyWorkers": 1,
      "plans": [
        {
          "planId": null,
          "name": null,
          "gpuModel": null,
          "gpuCount": null,
          "hourlyPriceMicros": null,
          "hourlyPriceUsd": null,
          "learnedPerf": null
        }
      ]
    }
  ],
  "events": [
    {
      "id": "example",
      "type": "example",
      "message": "example",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

PATCH /endpoints/{id}

เปลี่ยนการตั้งค่าการปรับขนาดของเอนด์พอยต์

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
name string ไม่
healthPath string ไม่
minWorkers integer ไม่
maxWorkers integer ไม่
idleSeconds integer ไม่
targetConcurrency integer ไม่
startupSeconds integer ไม่
coldStartNote string ไม่
maxHourlySpendUsd number หรือ null ไม่
monthlySpendCapUsd number หรือ null ไม่ Hard spending cap per UTC month in US dollars (0.01-100000), on what the ledger charged for this endpoint's workers. Checked every minute: at the cap the endpoint pauses itself (pausedReason: "spend_cap"), releases its workers and mails the owner; resuming answers 409 spend_cap_reached until the cap is raised or removed or a new month starts. Charges are posted as usage is metered, so the month can end up to a few minutes of the workers' price above the cap. Null (default) = no monthly cap.
resumeAtNewMonth boolean ไม่ When the endpoint was paused by its monthly spending cap (pausedReason: "spend_cap"): true = resume it by itself when a new UTC month starts below the cap (the owner is mailed and an event is written); false (default) = it stays paused until someone resumes it. An endpoint paused for any other reason (balance, failures, by a person, by staff) is never resumed by this.
releaseStoppedAtCap boolean ไม่ The monthly cap pauses an active endpoint and releases its workers, but it does not pause a stopped endpoint, whose stopped workers' disks (and model cache) keep billing. true = at the cap the stopped workers are released too, so spending truly stops (the next start is a cold one); false (default) = they are kept. spendCap.afterCap in the endpoint detail shows what keeps charging.
minWarmWorkers integer ไม่
warmPercent integer ไม่
maxQueueSeconds integer ไม่
targetQueueSeconds integer ไม่
fallbackPlanIds อาร์เรย์ของ string ไม่
jobMode sync | kit ไม่
jobTimeoutSeconds integer ไม่
rolloutMaxSurge integer ไม่
autoRollback boolean ไม่ Roll back to the earlier setup by itself when a worker on the new setup fails its health check during a rolling update (3 failed checks in a row after its start-up time, or not healthy within it). Default false: the update pauses and waits for you.
rateLimitPerMinute integer หรือ null ไม่ Proxy requests per minute for this endpoint, all keys together (1-1200). Null (default) keeps the platform limit of 1200; a value can only lower it. Over it the answer is 429 rate_limited with Retry-After and X-RateLimit-*.
templateId string ไม่
diskGb integer ไม่
env object ไม่
envKeep อาร์เรย์ของ string ไม่
constraints object หรือ null ไม่

ตัวอย่างคำขอ (curl)

curl -X PATCH "https://apidly.com/api/v1/endpoints/endpoint_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","healthPath":"example","minWorkers":0}'

JavaScript (SDK)

await apidly.endpoints.update("endpoint_example", {
  name: "example",
  healthPath: "example",
  minWorkers: 0
});

Python (SDK)

client.endpoints.update("endpoint_example", body={
    "name": "example",
    "healthPath": "example",
    "minWorkers": 0,
})

เครื่องมือบรรทัดคำสั่ง: apidly endpoints, apidly apply (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  }
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 429.

DELETE /endpoints/{id}

ลบเอนด์พอยต์ (คำขอหยุดทันที worker จะถูกปล่อยภายในไม่กี่นาที)

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

ตัวอย่างคำขอ (curl)

curl -X DELETE "https://apidly.com/api/v1/endpoints/endpoint_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.delete("endpoint_example");

Python (SDK)

client.endpoints.delete("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "deleted": false
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/{action}

หยุดชั่วคราว (ปฏิเสธคำขอ ปล่อย worker) หยุด (ปฏิเสธคำขอ คง worker ไว้ในสถานะหยุด) หรือกลับมาทำงานต่อของเอนด์พอยต์

resume works from paused and from stopped alike (on an active endpoint it only clears the count of failed worker starts): the endpoint answers status: active at once and its workers come back on the next scaling pass (stopped workers are started again, released ones are replaced by new ones). 404 feature_unavailable for stop and resume while serverless is switched off for the platform; pause always works.

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin · สิทธิ์: endpoints.manage

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
action path pause | resume | stop ใช่

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/pause" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.pause("endpoint_example");
await apidly.endpoints.resume("endpoint_example");

Python (SDK)

client.endpoints.pause("endpoint_example")
client.endpoints.resume("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  }
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/rollout

ทำต่อ ยกเลิก เริ่มใหม่ หรือย้อนกลับการอัปเดตแบบทยอยของเอนด์พอยต์

Changing what workers are launched with (PATCH with templateId, diskGb, env or constraints, or editing the template) starts a rolling update: for each old worker a new one is started (at most rolloutMaxSurge at a time) and, once it is healthy, the old one stops taking requests, finishes what it has (up to 5 minutes) and is released, so capacity never drops. If a new worker fails, the update pauses and says why; with autoRollback on, a new worker that fails its health check rolls the update back by itself instead (once: an automatic rollback never rolls back again). action: resume a paused update, cancel a running one (workers keep running as they are), start one again for workers still on an older setup, rollback to the settings from before the update (answers 409 cannot_roll_back when they are unknown, for example after a template edit: restore the template's earlier revision instead).

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
action resume | cancel | rollback | start ใช่

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/rollout" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"resume"}'

JavaScript (SDK)

await apidly.endpoints.rollout("endpoint_example", "resume");

Python (SDK)

client.endpoints.rollout("endpoint_example", action="resume")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  }
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 409, 429.

GET /endpoints/{id}/groups

กลุ่ม worker ของเอนด์พอยต์

An endpoint without groups has one implicit group made of its plan and alternative plans. Each plan shows today's price and the throughput learned from worker reports.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/groups" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.groups("endpoint_example");

Python (SDK)

client.endpoints.groups("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "groups": [
    {
      "id": "example",
      "implicit": false,
      "name": "example",
      "position": 1,
      "minWorkers": 1,
      "maxWorkers": 1,
      "maxPriceMicros": "1000000",
      "maxPriceUsd": "1.000000",
      "activeWorkers": 1,
      "readyWorkers": 1,
      "plans": [
        {
          "planId": null,
          "name": null,
          "gpuModel": null,
          "gpuCount": null,
          "hourlyPriceMicros": null,
          "hourlyPriceUsd": null,
          "learnedPerf": null
        }
      ]
    }
  ]
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

PUT /endpoints/{id}/groups

แทนที่กลุ่ม worker ของเอนด์พอยต์

Up to 5 groups, each with up to 3 GPU plans tried in order (a plan belongs to one group only), a minimum, a maximum and an optional price limit per worker per hour. Groups are filled in the order given: the next group gets workers when the earlier ones are full or cannot start one (no machine free, or every plan above the price limit). The first group's plans also become the endpoint's planId and fallbackPlanIds. An empty list returns to one implicit group. Workers already running keep running.

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
groups อาร์เรย์ของ object ใช่

ตัวอย่างคำขอ (curl)

curl -X PUT "https://apidly.com/api/v1/endpoints/endpoint_example/groups" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"groups":[{"name":"example","planIds":["example"],"maxWorkers":1}]}'

JavaScript (SDK)

await apidly.endpoints.setGroups("endpoint_example", {
  groups: [
    {
      name: "example",
      planIds: [
        "example"
      ],
      maxWorkers: 1
    }
  ]
});

Python (SDK)

client.endpoints.set_groups("endpoint_example", groups=[{
    "name": "example",
    "planIds": ["example"],
    "maxWorkers": 1,
}])

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "groups": [
    {
      "id": "example",
      "implicit": false,
      "name": "example",
      "position": 1,
      "minWorkers": 1,
      "maxWorkers": 1,
      "maxPriceMicros": "1000000",
      "maxPriceUsd": "1.000000",
      "activeWorkers": 1,
      "readyWorkers": 1,
      "plans": [
        {
          "planId": null,
          "name": null,
          "gpuModel": null,
          "gpuCount": null,
          "hourlyPriceMicros": null,
          "hourlyPriceUsd": null,
          "learnedPerf": null
        }
      ]
    }
  ]
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 429.

GET /endpoints/{id}/metrics

Requests, jobs, queue wait, execution time, workers, cold starts and cost over time

window is 1h, 24h (default) or 7d (range is the older name). Each point and the summary carry: proxied requests, errors and refusals; request latency p50/p95 (upper bound of a histogram bucket, 50 ms to 120 s); queue wait p50/p95 of served requests (queueP50Ms, queueP95Ms) and of jobs (jobQueueP50Ms, jobQueueP95Ms); job execution time p50/p95 (execP50Ms, execP95Ms); finished jobs by outcome (jobsSucceeded, jobsFailed, jobsTimedOut, jobsExpired, jobsCancelled); request timeouts (504); workers, ready and not ready; cold starts (workers that first passed their health check within 2 hours of being asked for; warmStarts counts the rest) with p50/p95 seconds in the summary; estimated cost and cost per hour (costPerHourMicros), and in the summary requestsPerMinute, jobsPerMinute and costPer1kRequestsMicros (estimated cost per 1000 proxied requests and finished jobs; null without any). summary.chargedMicros is what the ledger actually took for this endpoint's workers since the start of the window (net of credits). Minute counters and the request log are kept 7 days; finished jobs at most 24 hours (summary.jobsKeptHours), so job figures never reach further back.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
window query 1h | 24h | 7d ไม่ Time window: 1h, 24h (default) or 7d. Wins over range.
range query 1h | 24h | 7d ไม่ Older name of window, still accepted.

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/metrics" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.metrics("endpoint_example");

Python (SDK)

client.endpoints.metrics("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "key": null
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

GET /endpoints/{id}/proxy/{...path}

ส่งต่อ GET ไปยัง worker ที่พร้อม (เช่น /v1/models)

Any path after /proxy/ is sent to the worker's HTTP server, with the query string and body (up to 4 MB). The answer (status, body, content type) streams back unchanged; the worker's address is never shown. When no worker is ready the answer is 503 no_worker_ready with Retry-After, and a key with scope servers or higher also asks for a worker to start. Requests longer than 300 seconds are cut off. Per key 600 and per endpoint 1200 requests per minute; an endpoint's rateLimitPerMinute lowers its own limit, and then every answer also carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (epoch seconds), and a 429 rate_limited carries Retry-After. The key needs endpoints.invoke: a key with its own permission list must include it, and a key without a list has it only while the member who created it holds it (every built-in role does); otherwise the answer is 403 forbidden.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
...path path string ใช่ The worker path, one or more segments.

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/proxy/v1/models" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.proxyGet("endpoint_example", "example");

Python (SDK)

client.endpoints.proxy_get("endpoint_example", path="example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

null

สถานะข้อผิดพลาด: 400, 401, 403, 404, 413, 429, 503.

POST /endpoints/{id}/proxy/{...path}

ส่งต่อคำขอไปยัง worker ที่พร้อมและสตรีมคำตอบกลับ

Any path after /proxy/ is sent to the worker's HTTP server, with the query string and body (up to 4 MB). The answer (status, body, content type) streams back unchanged; the worker's address is never shown. When no worker is ready the answer is 503 no_worker_ready with Retry-After, and a key with scope servers or higher also asks for a worker to start. Requests longer than 300 seconds are cut off. Per key 600 and per endpoint 1200 requests per minute; an endpoint's rateLimitPerMinute lowers its own limit, and then every answer also carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (epoch seconds), and a 429 rate_limited carries Retry-After. The key needs endpoints.invoke: a key with its own permission list must include it, and a key without a list has it only while the member who created it holds it (every built-in role does); otherwise the answer is 403 forbidden.

สโคปที่ต้องใช้: servers

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
...path path string ใช่ The worker path, one or more segments.

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/proxy/v1/models" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.proxy("endpoint_example", "example");

Python (SDK)

client.endpoints.proxy("endpoint_example", path="example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

null

สถานะข้อผิดพลาด: 400, 401, 403, 404, 413, 429, 503.

GET /endpoints/{id}/openai/v1/{...path}

URL ฐานแบบ OpenAI: GET /v1/... ไปยัง worker ที่พร้อม (เช่น /models)

Same as the proxy with the worker path /v1/{path}: set base_url to .../endpoints/{id}/openai/v1 in an OpenAI SDK and use your API key as the key. Streaming answers pass through. Token counts in the request log come from usage in non-streaming JSON answers. The key needs endpoints.invoke: a key with its own permission list must include it, and a key without a list has it only while the member who created it holds it (every built-in role does); otherwise the answer is 403 forbidden.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
...path path string ใช่ The path after /v1, one or more segments.

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/openai/v1/v1/models" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.openaiGet("endpoint_example", "example");

Python (SDK)

client.endpoints.openai_get("endpoint_example", path="example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

null

สถานะข้อผิดพลาด: 400, 401, 403, 404, 413, 429, 503.

POST /endpoints/{id}/openai/v1/{...path}

URL ฐานแบบ OpenAI: POST /v1/... ไปยัง worker ที่พร้อม (chat/completions, completions, embeddings)

Same as the proxy with the worker path /v1/{path}: set base_url to .../endpoints/{id}/openai/v1 in an OpenAI SDK and use your API key as the key. Streaming answers pass through. Token counts in the request log come from usage in non-streaming JSON answers. The key needs endpoints.invoke: a key with its own permission list must include it, and a key without a list has it only while the member who created it holds it (every built-in role does); otherwise the answer is 403 forbidden.

สโคปที่ต้องใช้: servers

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
...path path string ใช่ The path after /v1, one or more segments.

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/openai/v1/v1/models" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.openai("endpoint_example", "example");

Python (SDK)

client.endpoints.openai("endpoint_example", path="example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

null

สถานะข้อผิดพลาด: 400, 401, 403, 404, 413, 429, 503.

GET /endpoints/{id}/jobs

งานแบบอะซิงโครนัสล่าสุดของเอนด์พอยต์

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
limit query integer ไม่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/jobs?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.listJobs("endpoint_example", { limit: 20 });

Python (SDK)

client.endpoints.list_jobs("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "jobs": [
    {
      "id": "example",
      "endpointId": "id_example",
      "status": "queued",
      "mode": "sync",
      "method": "example",
      "path": "example",
      "requestBytes": 1,
      "cost": 1,
      "priority": 1,
      "queueTtlSeconds": 1,
      "resultTtlSeconds": 1,
      "timeoutSeconds": 1,
      "webhook": false,
      "keepRequest": false,
      "retryOf": "example",
      "retryable": false,
      "attempts": 1,
      "errorCode": "example",
      "resultStatus": 1,
      "resultBytes": 1,
      "progress": null,
      "createdAt": "2026-11-21T10:00:00.000Z",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "expiresAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/jobs

ใส่งานแบบอะซิงโครนัสเข้าคิว (คำขอสูงสุด 1 MB)

Answers 202 with the job at once. The stored request is sent to a ready worker (the endpoint starts one when none is ready). Mode sync: the platform holds the request for the answer, so a job may last at most 280 seconds. Mode kit: the worker runs the worker kit, accepts the job at once and posts the answer back; up to one hour. The answer (up to 4 MB) is kept 24 hours (resultTtlSeconds keeps it less); set webhook for an endpoint.job.completed event. At most 100 jobs wait per endpoint; a job that finds no worker within an hour (queueTtlSeconds sooner) expires. Waiting jobs go to workers by priority (higher first, oldest first within one priority; strict, so a lower priority waits while higher ones wait, until its queue time ends); a job sent while a worker is free may start at once unless a higher-priority job is waiting. The key needs endpoints.invoke: a key with its own permission list must include it, and a key without a list has it only while the member who created it holds it (every built-in role does); otherwise the answer is 403 forbidden. A paused or stopped endpoint answers 409 endpoint_not_active, or 409 spend_cap_reached when its monthly spending cap paused it. Optional request headers on the proxy: X-Apidly-Cost (1-100, default 1) is the load the request counts for in scaling; X-Session-Id (1-128 of letters, digits, ._:-) keeps requests with the same value on the same worker while it stays healthy (30 minutes after last use). When no worker is ready a request is held up to the endpoint's maxQueueSeconds (default 300, at most 900) before 503 queue_timeout; one request is held for at most 240 seconds, so a longer setting ends in 503 with Retry-After at that point. The first request after an idle period can take several minutes (cold start): use the async jobs route or keep one warm worker. Every answer carries X-Request-Id, X-Worker-Id and X-Queue-Ms.

สโคปที่ต้องใช้: servers · ลองซ้ำได้อย่างปลอดภัยด้วย: Idempotency-Key

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
path string ใช่
method POST | PUT | GET ไม่
query string ไม่
input ใดก็ได้ ไม่
bodyBase64 string ไม่
contentType string ไม่
webhook boolean ไม่
cost integer ไม่
priority integer ไม่ Dispatch order within this endpoint (-10 to 10, default 0): a waiting job with a higher priority is sent to a worker first, and jobs of one priority go oldest first. Strict: a lower-priority job waits as long as a higher one is waiting for a worker, until its queue time-to-live ends (then it expires); a higher job that cannot be sent for a reason of its own (it failed or was already taken) does not hold it back.
queueTtlSeconds integer ไม่ Longest the job may wait for a worker before it expires with no_worker (60-3600 seconds, default 3600). Checked once a minute.
resultTtlSeconds integer ไม่ How long the finished job and its answer are kept (60-86400 seconds, default 86400). Removed within a minute after that.
keepRequest boolean ไม่ Keep the request body after the job ends, for as long as the finished job is kept (resultTtlSeconds), so POST .../jobs/{jobId}/retry can send it again. Default false: the body is deleted when the job ends, and only a job without a body can be retried.

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/jobs" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"path":"example"}'

JavaScript (SDK)

await apidly.endpoints.createJob("endpoint_example", {
  path: "example"
});

Python (SDK)

client.endpoints.create_job("endpoint_example", body={
    "path": "example",
})

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (202)

{
  "job": {
    "id": "example",
    "endpointId": "id_example",
    "status": "queued",
    "mode": "sync",
    "method": "example",
    "path": "example",
    "requestBytes": 1,
    "cost": 1,
    "priority": 1,
    "queueTtlSeconds": 1,
    "resultTtlSeconds": 1,
    "timeoutSeconds": 1,
    "webhook": false,
    "keepRequest": false,
    "retryOf": "example",
    "retryable": false,
    "attempts": 1,
    "errorCode": "example",
    "resultStatus": 1,
    "resultBytes": 1,
    "progress": null,
    "createdAt": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z",
    "expiresAt": "2026-11-21T10:00:00.000Z"
  }
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 409, 413, 429.

GET /endpoints/{id}/jobs/{jobId}

สถานะของงานหนึ่งรายการ พร้อมคำตอบเมื่อเสร็จ

job.result holds the worker's answer: status, contentType, bytes, and body as text (encoding: utf8) for text and JSON answers, else base64. With waitSeconds (up to 60) the answer comes as soon as the job has ended, or after that many seconds with the job as it is then; repeat the call to wait longer. A waiting call holds no database connection and counts once against the read limit; each key may make at most 30 calls per minute that wait (then 429 rate_limited with Retry-After).

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
jobId path string ใช่
waitSeconds query integer ไม่ Wait up to this many seconds (0-60, default 0) for the job to end: the answer comes as soon as it is succeeded, failed, cancelled or expired, or at the timeout with the current state. Repeat the call to wait longer.

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/jobs/endpoint_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.getJob("endpoint_example", "endpoint_example");

Python (SDK)

client.endpoints.get_job("endpoint_example", "endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "job": {
    "id": "example",
    "endpointId": "id_example",
    "status": "queued",
    "mode": "sync",
    "method": "example",
    "path": "example",
    "requestBytes": 1,
    "cost": 1,
    "priority": 1,
    "queueTtlSeconds": 1,
    "resultTtlSeconds": 1,
    "timeoutSeconds": 1,
    "webhook": false,
    "keepRequest": false,
    "retryOf": "example",
    "retryable": false,
    "attempts": 1,
    "errorCode": "example",
    "resultStatus": 1,
    "resultBytes": 1,
    "progress": null,
    "createdAt": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z",
    "expiresAt": "2026-11-21T10:00:00.000Z"
  }
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/jobs/{jobId}/cancel

ยกเลิกงานที่ยังไม่เสร็จ

Needs endpoints.invoke, as submitting a job does: a key with its own permission list must include it, and a key without a list has it only while the member who created it holds it (every built-in role does); otherwise the answer is 403 forbidden. A job that already finished is returned unchanged.

สโคปที่ต้องใช้: servers

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
jobId path string ใช่

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/jobs/endpoint_example/cancel" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.cancelJob("endpoint_example", "endpoint_example", "endpoint_example", "endpoint_example");

Python (SDK)

client.endpoints.cancel_job("endpoint_example", "endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "job": {
    "id": "example",
    "endpointId": "id_example",
    "status": "queued",
    "mode": "sync",
    "method": "example",
    "path": "example",
    "requestBytes": 1,
    "cost": 1,
    "priority": 1,
    "queueTtlSeconds": 1,
    "resultTtlSeconds": 1,
    "timeoutSeconds": 1,
    "webhook": false,
    "keepRequest": false,
    "retryOf": "example",
    "retryable": false,
    "attempts": 1,
    "errorCode": "example",
    "resultStatus": 1,
    "resultBytes": 1,
    "progress": null,
    "createdAt": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z",
    "expiresAt": "2026-11-21T10:00:00.000Z"
  }
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/jobs/{jobId}/retry

ส่งงานที่ล้มเหลว ถูกยกเลิก หรือหมดอายุอีกครั้งเป็นงานใหม่

Answers 202 with a NEW job that carries the original's request, path, method, cost and webhook setting, with retryOf set to the original's id. priority, queueTtlSeconds and resultTtlSeconds are the original's unless the body sets them. Counts like any submit: the endpoint must be active (409 endpoint_not_active; 409 spend_cap_reached when its monthly spending cap paused it) and at most 100 jobs may wait (429 too_many_jobs). 409 job_not_retryable when the job succeeded or has not ended; 409 job_request_gone when its request body is no longer stored (a body is deleted when a job ends unless it was submitted with keepRequest: true; a job without a body can always be retried). Needs endpoints.invoke, as submitting does. Honours Idempotency-Key: a repeat with the same key answers the same new job.

สโคปที่ต้องใช้: servers · ลองซ้ำได้อย่างปลอดภัยด้วย: Idempotency-Key

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
jobId path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
priority integer ไม่ Priority of the new job (default: the original's).
queueTtlSeconds integer ไม่ Queue time-to-live of the new job (default: the original's).
resultTtlSeconds integer ไม่ Result time-to-live of the new job (default: the original's).

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/jobs/endpoint_example/retry" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"priority":-10,"queueTtlSeconds":60,"resultTtlSeconds":60}'

JavaScript (SDK)

await apidly.endpoints.retryJob("endpoint_example", "endpoint_example");

Python (SDK)

client.endpoints.retry_job("endpoint_example", "endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (202)

{
  "job": {
    "id": "example",
    "endpointId": "id_example",
    "status": "queued",
    "mode": "sync",
    "method": "example",
    "path": "example",
    "requestBytes": 1,
    "cost": 1,
    "priority": 1,
    "queueTtlSeconds": 1,
    "resultTtlSeconds": 1,
    "timeoutSeconds": 1,
    "webhook": false,
    "keepRequest": false,
    "retryOf": "example",
    "retryable": false,
    "attempts": 1,
    "errorCode": "example",
    "resultStatus": 1,
    "resultBytes": 1,
    "progress": null,
    "createdAt": "2026-11-21T10:00:00.000Z",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z",
    "expiresAt": "2026-11-21T10:00:00.000Z"
  }
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 409, 429.

POST /endpoints/{id}/jobs/purge

ยกเลิกงานทั้งหมดที่ยังรอ worker

Cancels the endpoint's jobs that are still queued (running jobs are not touched), each with error code purged; olderThanSeconds limits it to jobs that have waited at least that long. dryRun: true only counts them. Answers { count, dryRun }. Acts on the jobs of every key, so a key bound to one endpoint cannot call it.

สโคปที่ต้องใช้: full · สิทธิ์: endpoints.manage

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
olderThanSeconds integer ไม่ Only jobs that have waited at least this long (0-3600 seconds). Default: every waiting job.
dryRun boolean ไม่ true counts the jobs that would be cancelled and changes nothing.

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/jobs/purge" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"olderThanSeconds":0,"dryRun":false}'

JavaScript (SDK)

await apidly.endpoints.purgeJobs("endpoint_example");

Python (SDK)

client.endpoints.purge_jobs("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "count": 1,
  "dryRun": false
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 429.

GET /endpoints/{id}/health

สรุปสถานะของ endpoint

One read-only answer from what we already record: workers by state, the queue (waiting and running jobs, age of the oldest waiting one), results of the last 15 minutes (proxied requests and errors; jobs succeeded, failed, timed out, expired, cancelled), the rolling update, the pause reason and the last scaling event. status is ok, degraded (work is done but something needs a look), down (jobs wait 10 minutes with no ready worker, or none of at least 5 recent results succeeded) or paused (paused or stopped); reasons lists why, each with a stable code, one sentence and, where it has one, the number it is about.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/health" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.health("endpoint_example");

Python (SDK)

client.endpoints.health("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "health": {
    "endpointId": "id_example",
    "status": "ok",
    "reasons": [
      {
        "code": "paused",
        "message": "example",
        "value": 1
      }
    ],
    "endpointStatus": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "workers": {
      "ready": 1,
      "starting": 1,
      "unhealthy": 1,
      "draining": 1,
      "warm": 1,
      "total": 1,
      "desired": 1,
      "min": 1,
      "max": 1
    },
    "queue": {
      "queued": 1,
      "running": 1,
      "oldestQueuedAt": "2026-11-21T10:00:00.000Z",
      "oldestQueuedSeconds": 1
    },
    "recent": {
      "windowMinutes": 1,
      "requests": 1,
      "requestErrors": 1,
      "jobsSucceeded": 1,
      "jobsFailed": 1,
      "jobsTimedOut": 1,
      "jobsExpired": 1,
      "jobsCancelled": 1
    },
    "rollout": {
      "state": "rolling",
      "total": 1,
      "replaced": 1,
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z"
    },
    "lastScaleEvent": {
      "message": "example",
      "createdAt": "2026-11-21T10:00:00.000Z"
    },
    "checkedAt": "2026-11-21T10:00:00.000Z"
  }
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

GET /endpoints/{id}/requests

บันทึกรายคำขอ (เก็บไว้ 7 วัน ใหม่สุดก่อน)

One row per proxied request or job dispatch: id (the X-Request-Id), time, status, our error code when we answered, latency, queue time, worker id, bytes in and out, load units, and token counts for non-streaming OpenAI-style JSON answers. Never a body or header value. format=csv downloads the same rows.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
status query all | 2xx | 4xx | 5xx | queued_out ไม่
kind query all | proxy | job ไม่
limit query integer ไม่
before query string ไม่
format query json | csv ไม่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/requests?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.listRequests("endpoint_example", { limit: 20 });

Python (SDK)

client.endpoints.list_requests("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "requests": [
    {
      "id": "example",
      "at": "2026-11-21T10:00:00.000Z",
      "kind": "proxy",
      "method": "example",
      "status": 1,
      "errorCode": "example",
      "latencyMs": 1,
      "queueMs": 1,
      "workerId": "id_example",
      "bytesIn": 1,
      "bytesOut": 1,
      "tokensIn": 1,
      "tokensOut": 1,
      "cost": 1,
      "sessioned": false
    }
  ]
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

GET /endpoints/{id}/logs

Recent log lines of every worker, or of one

One block per worker server (at most 12 per call; skipped counts the rest), or only the worker named by worker (404 when it is not one of the endpoint's workers): the same scrubbed lines as GET /servers/{id}/logs. A worker whose log cannot be read right now comes back with empty logs and error: true.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
tail query integer ไม่
worker query string ไม่ Only this worker (its server id, from the endpoint's workers).

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/logs" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.logs("endpoint_example");

Python (SDK)

client.endpoints.logs("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "workers": [
    {
      "serverId": "id_example",
      "label": "example",
      "status": "example",
      "logs": "example",
      "error": false
    }
  ],
  "skipped": 1
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

GET /endpoints/{id}/jobs/{jobId}/logs

Log tail of the worker that ran a job

For a failed job: what its worker printed. The lines are the tail of that worker's server log read now (the same scrubbed lines as GET /servers/{id}/logs); the host log has no time per line, so they may include lines of other jobs on the same worker. available: false with reason not_dispatched (the job never reached a worker), worker_gone (the worker was released; its log went with it) or unreadable (try again). Not an invoke route: a key bound to one endpoint gets 403.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
jobId path string ใช่
tail query integer ไม่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/jobs/endpoint_example/logs" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.jobLogs("endpoint_example", "endpoint_example");

Python (SDK)

client.endpoints.job_logs("endpoint_example", "endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "job": {
    "jobId": "id_example",
    "jobStatus": "example",
    "errorCode": "example",
    "startedAt": "2026-11-21T10:00:00.000Z",
    "finishedAt": "2026-11-21T10:00:00.000Z",
    "serverId": "id_example",
    "serverStatus": "example",
    "available": false,
    "reason": "not_dispatched",
    "logs": "example"
  }
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

GET /endpoints/{id}/presets

Scaling presets with their hourly cost

Three presets, each a set of six scaling settings: scale_to_zero (nothing runs with no traffic, workers released after 60 s idle; the first request waits for a cold start), always_warm (one worker always running, released down to it after 10 minutes idle) and burst (one running and one stopped warm worker, room for at least 5, a 2 s queue target and 2 minutes idle). Costs come from the plan's live price: idleHourlyMicros with no traffic (minimum workers running plus the warm workers' disks), maxHourlyMicros at full load (never above the hourly spend cap; maxWorkersAfterCap says how many workers that is). current is true for the preset the endpoint already matches. Worker groups keep their own floors and ceilings (hasGroups).

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/presets" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.presets("endpoint_example");

Python (SDK)

client.endpoints.presets("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "presets": [
    {
      "name": "scale_to_zero",
      "settings": {
        "minWorkers": 1,
        "maxWorkers": 1,
        "minWarmWorkers": 1,
        "warmPercent": 1,
        "idleSeconds": 1,
        "targetQueueSeconds": 1
      },
      "current": false,
      "idleHourlyMicros": "1000000",
      "idleHourlyUsd": "1.000000",
      "maxHourlyMicros": "1000000",
      "maxHourlyUsd": "1.000000",
      "maxWorkersAfterCap": 1
    }
  ],
  "workerHourlyMicros": "1000000",
  "workerHourlyUsd": "1.000000",
  "warmWorkerHourlyMicros": "1000000",
  "warmWorkerHourlyUsd": "1.000000",
  "hasGroups": false
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/presets

Apply a scaling preset

Sets the preset's six scaling settings in one change (recorded as a preset release). It never starts a rolling update: what workers are launched with does not change.

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่

เนื้อหาคำขอ

ชื่อ ชนิด จำเป็น คำอธิบาย
preset scale_to_zero | always_warm | burst ใช่

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/presets" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"preset":"scale_to_zero"}'

JavaScript (SDK)

await apidly.endpoints.applyPreset("endpoint_example", "scale_to_zero");

Python (SDK)

client.endpoints.apply_preset("endpoint_example", preset="scale_to_zero")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  }
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 429.

GET /endpoints/{id}/releases

Past configurations of an endpoint

Every saved change of the endpoint's settings is a numbered release (the last 50 are kept), newest first: who made it (actor, null for an automatic rollback: the member's id and display name; email is null unless the key may manage the team (team.manage); apiKeyId when made with a key), when, how (source: baseline for the settings found before the first recorded change, create, update, preset, restore with restoredFrom, rollback, auto_rollback), its settings (variable names only, never values), changes since the release before it and changesFromCurrent (what restoring it would change). current marks the release the endpoint matches now. The GPU plan and the name are not part of a release.

สโคปที่ต้องใช้: read

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
limit query integer ไม่

ตัวอย่างคำขอ (curl)

curl "https://apidly.com/api/v1/endpoints/endpoint_example/releases?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.releases("endpoint_example", { limit: 20 });

Python (SDK)

client.endpoints.releases("endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "releases": [
    {
      "version": 1,
      "source": "example",
      "restoredFrom": 1,
      "createdAt": "2026-11-21T10:00:00.000Z",
      "actor": {
        "id": "example",
        "name": "example",
        "email": "dev@example.com"
      },
      "apiKeyId": "id_example",
      "current": false,
      "settings": {
        "key": null
      },
      "changes": [
        {
          "field": null,
          "from": null,
          "to": null,
          "added": null,
          "removed": null,
          "changed": null
        }
      ],
      "changesFromCurrent": [
        {
          "field": null,
          "from": null,
          "to": null,
          "added": null,
          "removed": null,
          "changed": null
        }
      ]
    }
  ],
  "hasMore": false
}

สถานะข้อผิดพลาด: 401, 403, 404, 429.

POST /endpoints/{id}/releases/{version}/restore

Restore an earlier release (rollback)

Puts the release's settings back through the same path as PATCH /endpoints/{id}, sending only what differs from now: a change of template, disk, variables, hardware requirements or model cache starts a rolling update, scaling changes apply at once. Recorded as a new restore release. changed: false when the endpoint already has those settings. 409 release_not_restorable when the stored settings are no longer accepted. A template whose content was edited since is used as it is now.

สโคปที่ต้องใช้: full · บทบาทของผู้สร้าง: admin

พารามิเตอร์

ชื่อ ตำแหน่ง ชนิด จำเป็น คำอธิบาย
id path string ใช่
version path string ใช่

ตัวอย่างคำขอ (curl)

curl -X POST "https://apidly.com/api/v1/endpoints/endpoint_example/releases/endpoint_example/restore" \
  -H "Authorization: Bearer $APIDLY_API_KEY"

JavaScript (SDK)

await apidly.endpoints.restoreRelease("endpoint_example", "endpoint_example");

Python (SDK)

client.endpoints.restore_release("endpoint_example", "endpoint_example")

เครื่องมือบรรทัดคำสั่ง: apidly endpoints (เอกสารอ้างอิง CLI)

ตัวอย่างผลลัพธ์ (200)

{
  "endpoint": {
    "id": "example",
    "name": "example",
    "planId": "id_example",
    "templateId": "id_example",
    "diskGb": 1,
    "envKeys": [
      "example"
    ],
    "constraints": {
      "key": null
    },
    "status": "active",
    "pausedReason": "example",
    "pausedAt": "2026-11-21T10:00:00.000Z",
    "lastRequestAt": "2026-11-21T10:00:00.000Z",
    "url": "https://example.com/hook",
    "httpPort": 1,
    "healthPath": "example",
    "apiKind": "openai",
    "minWorkers": 1,
    "maxWorkers": 1,
    "idleSeconds": 1,
    "targetConcurrency": 1,
    "startupSeconds": 1,
    "coldStartNote": "example",
    "maxHourlySpendMicros": "1000000",
    "maxHourlySpendUsd": "1.000000",
    "monthlySpendCapMicros": "1000000",
    "monthlySpendCapUsd": "1.000000",
    "resumeAtNewMonth": false,
    "releaseStoppedAtCap": false,
    "desiredWorkers": 1,
    "minWarmWorkers": 1,
    "warmPercent": 1,
    "desiredWarm": 1,
    "maxQueueSeconds": 1,
    "targetQueueSeconds": 1,
    "fallbackPlanIds": [
      "example"
    ],
    "rollout": {
      "state": "rolling",
      "startedAt": "2026-11-21T10:00:00.000Z",
      "finishedAt": "2026-11-21T10:00:00.000Z",
      "total": 1,
      "replaced": 1,
      "reasonCode": "example",
      "reason": "example",
      "canRollBack": false,
      "automatic": false
    },
    "rolloutMaxSurge": 1,
    "autoRollback": false,
    "rateLimitPerMinute": 1,
    "perfByPlan": {
      "key": {
        "perf": 1,
        "samples": 1,
        "at": "2026-11-21T10:00:00.000Z"
      }
    },
    "jobMode": "sync",
    "jobTimeoutSeconds": 1,
    "openaiBaseUrl": "https://example.com/hook",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "activeWorkers": 1,
    "readyWorkers": 1
  },
  "changed": false
}

สถานะข้อผิดพลาด: 400, 401, 403, 404, 409, 429.

พร้อมลองแล้วหรือยัง

สร้างบัญชีฟรีและเติมเครดิตเมื่อต้องการเริ่มเซิร์ฟเวอร์ ยอดเติมเงินขั้นต่ำคือ $10

สร้างบัญชีฟรี

เนื้อหานี้มีประโยชน์หรือไม่

ยังแก้ไม่ได้ใช่ไหม ติดต่อเรา