> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gostudio.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Poll job status

> Looks up a watermark removal job by its `job_id`. `output_urls` and `credits_deducted` appear once `status` is `completed`; `error` appears when it is `failed`.

You do not need this to complete a normal generation — `POST /api/v2/apps/watermark-remover` already waits for the result. Use it to re-fetch the outputs of an earlier job, or to check on one submitted by a request whose connection dropped.

Allowed callers: `user`. An internal service token passes the auth gate but carries no user context, so every lookup returns `404`.




## OpenAPI

````yaml /openapi.yaml get /api/v2/apps/watermark-remover/{jobId}
openapi: 3.0.3
info:
  title: GoStudio Watermark Remover API
  version: 2.0.0
  description: >
    The Watermark Remover endpoints of the GoStudio v2 REST API. Every response
    uses a standard envelope: successes return `{ status, data }`; errors return
    `{ status, error: { type, code, dev, message } }`.


    Every endpoint here takes a **Supabase user JWT** as a Bearer token. An
    `internal` service token is accepted by the auth layer but carries no user
    identity, so it cannot be used to generate or look up a job. The one
    exception is the provider callback, which is authenticated by signature
    rather than by a caller token.
servers:
  - url: https://www.gostudio.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Watermark Remover
    description: AI watermark removal — orchestration, model metadata, and job polling.
  - name: Webhooks
    description: Endpoints called by external services, not by your application.
paths:
  /api/v2/apps/watermark-remover/{jobId}:
    get:
      tags:
        - Watermark Remover
      summary: Poll job status
      description: >
        Looks up a watermark removal job by its `job_id`. `output_urls` and
        `credits_deducted` appear once `status` is `completed`; `error` appears
        when it is `failed`.


        You do not need this to complete a normal generation — `POST
        /api/v2/apps/watermark-remover` already waits for the result. Use it to
        re-fetch the outputs of an earlier job, or to check on one submitted by
        a request whose connection dropped.


        Allowed callers: `user`. An internal service token passes the auth gate
        but carries no user context, so every lookup returns `404`.
      operationId: getWatermarkJob
      parameters:
        - name: jobId
          in: path
          required: true
          description: The `job_id` returned when the generation was submitted.
          schema:
            type: integer
            example: 12345
      responses:
        '200':
          description: Job status returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                  data:
                    $ref: '#/components/schemas/WatermarkPollResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Job not found, or not owned by the authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: 404
                error:
                  type: not_found_error
                  code: job_not_found
                  dev: 40404
                  message: Job not found.
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    WatermarkPollResult:
      type: object
      properties:
        job_id:
          type: integer
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - abandoned
        model_id:
          type: string
        output_urls:
          type: array
          description: Present once the job has completed.
          items:
            type: string
            format: uri
        credits_deducted:
          type: number
          description: Present once the job has completed.
        error:
          type: string
          description: Present only when the job failed.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          example: 400
        error:
          type: object
          properties:
            type:
              type: string
              example: validation_error
            code:
              type: string
              example: invalid_input
            dev:
              type: integer
              example: 40001
            message:
              type: string
              example: Some information is invalid.
  responses:
    BadRequest:
      description: The request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 400
            error:
              type: validation_error
              code: invalid_input
              dev: 40001
              message: Some information is invalid.
    Unauthorized:
      description: Missing or invalid Authorization Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 401
            error:
              type: authentication_error
              code: unauthorized
              dev: 40100
              message: Missing or invalid Authorization Bearer token.
    Forbidden:
      description: Caller type not allowed for this endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 403
            error:
              type: permission_error
              code: forbidden
              dev: 40300
              message: You don't have permission for this action.
    RateLimited:
      description: Too many requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 429
            error:
              type: rate_limit_error
              code: rate_limited
              dev: 42900
              message: You're doing that too often. Please wait a moment.
    ServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 500
            error:
              type: system_error
              code: internal_error
              dev: 50000
              message: Something went wrong on our end.
    ServiceUnavailable:
      description: >
        A dependency is temporarily unavailable. Auth-dependent endpoints return
        `service_unavailable` (dev 50300) when the auth provider is down;
        generation endpoints return `model_unavailable` (dev 50301) when the
        model provider is. Both are safe to retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: 503
            error:
              type: system_error
              code: service_unavailable
              dev: 50300
              message: Auth service is temporarily unavailable.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Supabase user JWT (or an internal service token). Send as
        `Authorization: Bearer <token>`.

````