BLACKFRIDAY 来了!

    领取40%优惠
    Armox
    Armox Academy 📚
    介绍
    快速入门指南
    理解Brain
    节点
    AI模型
    画布编辑器
    训练 LoRA
    Train MiniMax H3 LoRA
    提示词工程
    Nano Banana ProFlux模型视频提示词音频提示词
    文本节点
    图像节点
    视频节点
    音频节点
    上传节点
    工具节点
    Academy.canvas3dNodes
    连接节点
    运行工作流
    什么是应用?
    创建您的第一个应用
    运行应用
    创意人士的应用创意
    API 参考入门
    身份验证模型端点应用端点任务端点账户端点Webhook错误与速率限制
    图库
    下载与导出
    使用AI聊天
    与AI进行头脑风暴
    文本模型
    GPT-5.4Gemini 3.1 ProClaude Opus 4.6GPT-5Gemini 2.5 FlashClaude 4.5 SonnetDeepSeek V3.1Grok 4Llama 3 70BLlama 3 8B
    图像模型
    Nano BananaNano Banana 2Nano Banana ProGPT Image 2.5Flux 2 ProKrea 2 LargeKrea 2 MediumFlux 2 FlexFlux 2 DevFlux 1.1 Pro UltraGrok ImagineFlux Kontext MaxFlux Kontext ProSeedream 4Seedream 4.5Wan 2.2 ImageQwen ImageQwen Image Edit AnglesStable Diffusion XLGrok 2 ImageGen4 Image
    视频模型
    Kling V2.5 Turbo ProKling 2.6 ProGrok VideoVeo 3.1Veo 3.1 FastSeedance 1 ProSeedance 1 Pro FastSeedance 1 LiteSeedance 2.0Wan 2.6 I2VWan 2.6 T2VWan 2.5 I2VWan 2.5 T2VSora 2 ProSora 2Hailuo 2.3Hailuo 2.3 FastVideo-01 DirectorGen4 Aleph
    音频模型
    MusicGenMusic 1.5Music-01Lyria 2Speech-02 TurboSpeech-02 HDVoice CloningXTTS-v2
    工具模型
    Topaz Image UpscalerPrunaAI UpscaleCrystal UpscalerRemove BackgroundFace SwapImage FiltersProfessional HeadshotText RemovalInpaintAdd WatermarkVideo Upscale (Runway)Video Upscale (Topaz)Video Upscale (Bytedance)Lip Sync ProAuto CaptionReplace CharacterMotion Transfer
    Academy.models3d
    Hunyuan3D V3
    社交媒体内容
    产品摄影
    营销活动
    视频制作
    音频与音乐
    多步骤工作流
    图像到图像
    一致风格
    积分优化
    常见错误
    键盘快捷键
    示例画廊
    提示词库
    Seedance 2.0 for AEC
    企业版概述
    管理员控制台
    申请积分
    常见问题
    理解积分
    故障排除
    API 参考API 参考入门任务端点
    Copy to LLM

    Jobs Endpoint

    Every model/app run creates a job object.

    Use Jobs endpoints to:

    • list recent jobs
    • fetch one job by ID
    • cancel cancellable jobs

    Base paths:

    • GET /api/v1/jobs
    • GET /api/v1/jobs/:id
    • POST /api/v1/jobs/:id/cancel

    Job Lifecycle

    Jobs use these statuses:

    • pending
    • processing
    • completed
    • failed
    • cancelled
    flowchart LR
      pending --> processing
      processing --> completed
      processing --> failed
      pending --> cancelled
      processing --> cancelled
    

    Terminal statuses are:

    • completed
    • failed
    • cancelled

    GET /api/v1/jobs

    Lists recent jobs for the authenticated user.

    Query Parameters

    • limit (optional): 1-100, default 20

    Request

    curl -X GET "https://armox.ai/api/v1/jobs?limit=20" \
      -H "Authorization: Bearer sk_live_your_key_here"
    

    Response

    Prompt Template
    {
      "object": "list",
      "data": [
        {
          "id": "job_123",
          "run_type": "model",
          "model_id": "google/nano-banana",
          "app_id": null,
          "status": "completed",
          "input_data": { "input": { "prompt": "..." } },
          "output_data": { "outputImage": "https://..." },
          "error_message": null,
          "credits_charged": 70,
          "created_at": "2026-03-26T12:30:00.000Z",
          "completed_at": "2026-03-26T12:30:03.000Z"
        }
      ]
    }

    GET /api/v1/jobs/:id

    Returns one specific job.

    Request

    curl -X GET "https://armox.ai/api/v1/jobs/job_123" \
      -H "Authorization: Bearer sk_live_your_key_here"
    

    Response

    Prompt Template
    {
      "object": "job",
      "id": "0fefb57b-a89a-46f3-b7f6-da24841722f4",
      "run_type": "app",
      "model_id": null,
      "app_id": "cb2bbd2d-b538-4d34-a54e-a9158c2e0dbb",
      "status": "completed",
      "input_data": {
        "app_id": "cb2bbd2d-b538-4d34-a54e-a9158c2e0dbb",
        "inputs": {
          "93197f6b-0180-4da1-ad4a-87890d2c7d4a": [
            "https://example.com/reference-image.jpg"
          ],
          "ced4aa7b-a2a8-4b53-b9ea-1b3e7d9194b5": "auto"
        }
      },
      "output_data": {
        "app_id": "cb2bbd2d-b538-4d34-a54e-a9158c2e0dbb",
        "app_name": "Sketch to Render",
        "node_outputs": {
          "6fa95504-bf6c-44e6-bdda-c418903abc8c": {
            "outputImage": "https://armox-storage.s3.us-west-2.amazonaws.com/public/canvas-images/transform-this-architectural-h-2aebaf05-2c74-4b02-be78-979885f22aef.jpeg"
          }
        }
      },
      "error_message": null,
      "credits_charged": 200,
      "created_at": "2026-04-06T11:15:14.964978+00:00",
      "completed_at": "2026-04-06T11:17:14.985+00:00",
      "webhook_delivered": false
    }

    For app jobs:

    • model_id is usually null
    • output_data.node_outputs is keyed by internal node IDs
    • each node output may expose outputImage, outputVideo, outputAudio, or other model-specific fields

    POST /api/v1/jobs/:id/cancel

    Attempts to cancel a pending or processing job.

    Request

    curl -X POST "https://armox.ai/api/v1/jobs/job_123/cancel" \
      -H "Authorization: Bearer sk_live_your_key_here"
    

    Success Response

    {
      "id": "job_123",
      "object": "job",
      "status": "cancelled",
      "cancelled_at": "2026-03-26T12:35:00.000Z"
    }
    

    If the job can no longer be cancelled, API may return 409.


    Polling Pattern

    JavaScript

    Prompt Template
    async function waitForJob(jobId, apiKey) {
      const timeoutAt = Date.now() + 10 * 60 * 1000; // 10 min
    
      while (true) {
        const response = await fetch(`https://armox.ai/api/v1/jobs/${jobId}`, {
          headers: { Authorization: `Bearer ${apiKey}` },
        });
    
        if (response.status === 429) {
          const retryAfter = Number(response.headers.get("Retry-After") || 60);
          await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000));
          continue;
        }
    
        const job = await response.json();
        if (["completed", "failed", "cancelled"].includes(job.status)) {
          return job;
        }
    
        if (Date.now() > timeoutAt) throw new Error("Timed out waiting for job");
    
        // 10-15s polling avoids rate-limit issues on low-RPM API keys.
        await new Promise((resolve) => setTimeout(resolve, 10000));
      }
    }

    Python

    Prompt Template
    import time
    import requests
    
    def wait_for_job(job_id, api_key):
        timeout_at = time.time() + 600  # 10 min
        while True:
            response = requests.get(
                f"https://armox.ai/api/v1/jobs/{job_id}",
                headers={"Authorization": f"Bearer {api_key}"}
            )
    
            if response.status_code == 429:
                retry_after = int(response.headers.get("Retry-After", "60"))
                time.sleep(retry_after)
                continue
    
            job = response.json()
    
            if job.get("status") in ["completed", "failed", "cancelled"]:
                return job
    
            if time.time() > timeout_at:
                raise TimeoutError("Timed out waiting for job")
    
            time.sleep(10)

    Credits and Failures

    • credits are charged when a run is accepted
    • failed jobs are refunded by the job executor flow
    • cancelled jobs follow the platform's cancellation and credit logic

    Related Pages

    • Models Endpoint
    • Apps Endpoint
    • Webhooks
    上一页应用端点
    下一页账户端点

    准备好转变 您的创意工作流了吗?

    无需信用卡500免费积分

    本页内容

    Job LifecycleGET `/api/v1/jobs`Query ParametersRequestResponseGET `/api/v1/jobs/:id`RequestResponsePOST `/api/v1/jobs/:id/cancel`RequestSuccess ResponsePolling PatternJavaScriptPythonCredits and FailuresRelated Pages