{
  "info": {
    "_postman_id": "8b6c5d2e-2a13-4e8c-9c54-f2a14a1b0001",
    "name": "GPU-Agent Customer API (alpha v1)",
    "description": "Customer-facing API for GPU-Agent staging.\n\n**Stage 17.1 Final Purge** — the legacy preset-model image-generation requests have been REMOVED from this collection. The endpoints `POST /customer/jobs/image*` now return HTTP 410 with `error.code = LEGACY_DEPRECATED` and the GET `/jobs*` and `/artifacts/*/signed-url` reads were deleted. New training work uses `POST /api/v1/customer/training-jobs` (see `docs/customer-custom-training-guide.md`).\n\nPlace your API key in the environment variable `api_key` (use the matching `customer-api.postman_environment.example.json` as a template). Never commit a real key.\n\nAll endpoints scope to your own customer id; cross-tenant probes return 404.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{api_key}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api-staging.c3pool.cn"
    },
    {
      "key": "job_id",
      "value": ""
    },
    {
      "key": "artifact_id",
      "value": ""
    },
    {
      "key": "webhook_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "meta",
      "item": [
        {
          "name": "GET /customer/config",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/config",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "config"
              ]
            }
          }
        },
        {
          "name": "GET /customer/meta",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/meta",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "meta"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "auth (session — portal flow)",
      "item": [
        {
          "name": "POST /customer/auth/login",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/customer/auth/login",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "auth",
                "login"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"customer@example.com\",\n  \"password\": \"REPLACE_ME\"\n}"
            }
          }
        },
        {
          "name": "GET /customer/auth/me",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{session_token}}"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/customer/auth/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "auth",
                "me"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "api keys (session-only)",
      "item": [
        {
          "name": "POST /customer/api-keys",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{session_token}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/customer/api-keys",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "api-keys"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"postman-key\",\n  \"scopes\": [\"dataset:write\", \"training:write\", \"artifact:read\", \"usage:read\"]\n}"
            }
          },
          "description": "Plaintext returned EXACTLY ONCE in the `key` field. Save it now."
        },
        {
          "name": "GET /customer/api-keys",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{session_token}}"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/customer/api-keys?limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "api-keys"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "training (Stage 17.1 — current product)",
      "item": [
        {
          "name": "POST /customer/training-jobs",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-{{$timestamp}}"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/customer/training-jobs",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "training-jobs"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"my-tiny-mlp\",\n  \"dataset_id\": \"{{dataset_id}}\",\n  \"training_package_id\": \"{{training_package_id}}\",\n  \"sensitivity\": \"public\",\n  \"min_vram_mb\": 8000,\n  \"max_runtime_minutes\": 60\n}"
            }
          }
        },
        {
          "name": "GET /customer/training-jobs",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/training-jobs?limit=50",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "training-jobs"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        },
        {
          "name": "GET /customer/training-jobs/{{training_job_id}}",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/training-jobs/{{training_job_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "training-jobs",
                "{{training_job_id}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "usage",
      "item": [
        {
          "name": "GET /customer/usage/summary",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/usage/summary",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "usage",
                "summary"
              ]
            }
          }
        },
        {
          "name": "GET /customer/usage/daily",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/usage/daily?days=30",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "usage",
                "daily"
              ],
              "query": [
                {
                  "key": "days",
                  "value": "30"
                }
              ]
            }
          }
        },
        {
          "name": "GET /customer/usage/export.csv",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/usage/export.csv",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "usage",
                "export.csv"
              ]
            }
          }
        },
        {
          "name": "GET /customer/credits/ledger",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/credits/ledger?limit=100",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "credits",
                "ledger"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "100"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "webhooks",
      "item": [
        {
          "name": "POST /customer/webhooks",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/customer/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "webhooks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://your-receiver.example.com/gpu-agent\",\n  \"events\": [\"job.completed\", \"job.failed\", \"artifact.ready\"],\n  \"description\": \"postman-test\"\n}"
            }
          },
          "description": "The signing secret is in the `secret` field of the response — shown EXACTLY ONCE."
        },
        {
          "name": "GET /customer/webhooks",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "webhooks"
              ]
            }
          }
        },
        {
          "name": "POST /customer/webhooks/{{webhook_id}}/test",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/webhooks/{{webhook_id}}/test",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "webhooks",
                "{{webhook_id}}",
                "test"
              ]
            }
          }
        },
        {
          "name": "POST /customer/webhooks/{{webhook_id}}/rotate-secret  (Stage 16)",
          "request": {
            "method": "POST",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/webhooks/{{webhook_id}}/rotate-secret",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "webhooks",
                "{{webhook_id}}",
                "rotate-secret"
              ]
            }
          },
          "description": "Mints a new signing secret. The plaintext is in `secret` of the response and is shown ONCE. The old secret remains valid until previous_secret_expires_at."
        },
        {
          "name": "DELETE /customer/webhooks/{{webhook_id}}",
          "request": {
            "method": "DELETE",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/webhooks/{{webhook_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "webhooks",
                "{{webhook_id}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "credits (Stage 16)",
      "item": [
        {
          "name": "GET /customer/credits/statement.csv",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/api/v1/customer/credits/statement.csv",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "customer",
                "credits",
                "statement.csv"
              ]
            }
          }
        }
      ]
    }
  ]
}