Skip to main content
Requests

Get request status

Retrieve the current state and output of a generation request.

#Endpoint

GET https://api.higgsfield.ai/requests/{request_id}/status

#Authorization

Pass your API key ID and secret in the Authorization header:

Authorization: Key {api_key_id}:{api_key_secret}

#Parameters

Name Location Type Required Description
request_id path string Yes

#Example request

cURL
curl --request GET \
  --url https://api.higgsfield.ai/requests/{request_id}/status \
  --header "Authorization: Key ${HF_API_KEY_ID}:${HF_API_KEY_SECRET}"

#Responses

Status Description
200 Current request state and output, when available.
401 Missing or invalid API credentials.
404 The request does not exist or belongs to another account.

#Response fields

Field Type Description
status string Values: queued, in_progress, nsfw, failed, completed, canceled.
request_id string
status_url string
cancel_url string
error string or null
images array
video MediaOutput
audio MediaOutput
audios array
expires_at string or null When the request data is deleted and output URLs stop working. Present once the request has finished.
Complete OpenAPI specification
yaml
openapi: 3.1.0
info:
  title: Higgsfield API
  version: 2.0.0
  description: Submit generation requests and retrieve their status and outputs.
servers:
  - url: https://api.higgsfield.ai
security:
  - authKey: []
paths:
  /requests/{request_id}/status:
    get:
      tags:
        - Requests
      summary: Get request status
      description: Retrieve the current state and output of a generation request.
      operationId: get_request_status
      parameters:
        - name: request_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Request Id
      responses:
        '200':
          description: Current request state and output, when available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestStatus'
        '401':
          description: Missing or invalid API credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The request does not exist or belongs to another account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RequestStatus:
      title: Request
      type: object
      properties:
        status:
          enum:
            - queued
            - in_progress
            - nsfw
            - failed
            - completed
            - canceled
          title: Status
          type: string
        request_id:
          type: string
          format: uuid
        status_url:
          type: string
          format: uri
        cancel_url:
          type: string
          format: uri
        error:
          type:
            - string
            - 'null'
        images:
          type: array
          items:
            $ref: '#/components/schemas/MediaOutput'
        video:
          $ref: '#/components/schemas/MediaOutput'
        audio:
          $ref: '#/components/schemas/MediaOutput'
        audios:
          type: array
          items:
            $ref: '#/components/schemas/MediaOutput'
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the request data is deleted and output URLs stop working.
            Present once the request has finished.
      required:
        - status
        - request_id
    ErrorResponse:
      title: Error response
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    MediaOutput:
      title: Media output
      type: object
      additionalProperties: false
      properties:
        url:
          type: string
          format: uri
      required:
        - url
  securitySchemes:
    authKey:
      type: apiKey
      in: header
      name: Authorization
      description: Use `Key {api_key_id}:{api_key_secret}`.
Was this page helpful?
Navigation