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

# Get job status

> Poll for the current status and results of a browser agent job.

Use this endpoint to check if your browser automation task has completed
and retrieve the results. Poll this endpoint periodically (e.g., every 2-5 seconds)
until the status changes from 'running' to 'completed'.



## OpenAPI

````yaml get /v1/get_job_status/{job_id}
openapi: 3.1.0
info:
  title: Altrina Browser Agent API
  description: >

    AI-powered browser automation API that allows you to control web browsers
    programmatically.


    ## What can Altrina do?


    Altrina uses advanced AI models to understand natural language instructions
    and execute them in a web browser:

    - **Web Scraping**: Extract data from any website without writing selectors

    - **Form Automation**: Fill out complex forms and multi-step workflows

    - **Testing**: Automated end-to-end testing with natural language assertions

    - **Research**: Gather information across multiple sites and compile results

    - **Monitoring**: Check websites for changes or specific conditions


    ## Authentication

    All API endpoints (except `/v1/health`) require authentication via API key.


    ### Getting an API Key

    1. Go to
    [https://app.altrina.com/settings](https://app.altrina.com/settings)

    2. Click on "Generate API Key"

    3. Copy your API key and keep it secure


    ### Using the API Key

    Include your API key in the `Authorization` header as a Bearer token:

    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    ### Example cURL Request

    ```bash

    curl -X POST "https://api.altrina.com/v1/run_browser_agent" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "directive": "Go to news.ycombinator.com and get the titles and points of the top 3 stories on the homepage",
        "browser_config": {
          "width": 1920,
          "height": 1080,
          "residential_ip": false,
          "keep_browser_open": false,
          "use_user_browser_profile": false
        }
      }'
    ```


    **Note on Browser Profiles**: By default (`use_user_browser_profile:
    false`), each API call uses a fresh browser profile with no cookies or
    browsing history. Set `use_user_browser_profile: true` if you need to
    maintain logged-in state across multiple API calls.


    ## Rate Limits


    - **Browser Agent**: 10 requests/minute

    - **Status Polling**: 60 requests/minute

    - **Credit Balance**: 60 requests/minute


    ## Support


    For issues or questions, contact support@altrina.com
  version: 1.0.0
servers:
  - url: https://api.altrina.com
security: []
tags:
  - name: Browser Agent
    description: Start and monitor browser automation tasks
  - name: Workflows
    description: Trigger saved workflows via API or webhook
  - name: Account
    description: Manage credits and subscription
  - name: System
    description: Service health and status
paths:
  /v1/get_job_status/{job_id}:
    get:
      tags:
        - Browser Agent
      summary: Get job status
      description: >-
        Poll for the current status and results of a browser agent job.


        Use this endpoint to check if your browser automation task has completed

        and retrieve the results. Poll this endpoint periodically (e.g., every
        2-5 seconds)

        until the status changes from 'running' to 'completed'.
      operationId: get_job_status_v1_get_job_status__job_id__get
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            description: The unique job identifier returned when starting the browser agent
            title: Job Id
          description: The unique job identifier returned when starting the browser agent
      responses:
        '200':
          description: Job status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Job not found or doesn't belong to user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    JobStatusResponse:
      properties:
        job_id:
          type: string
          title: Job Id
          description: Unique identifier for the job
        user_id:
          type: string
          title: User Id
          description: The user who owns this job
        directive:
          anyOf:
            - type: string
            - type: 'null'
          title: Directive
          description: The instruction the agent was asked to perform
        status:
          $ref: '#/components/schemas/JobRunStatus'
          description: Current job status
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
          description: Final output, if completed. Arbitrary JSON.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if the job failed
        live_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Live Url
          description: >-
            Direct link to watch the live browser session. You can observe the
            agent working in real-time and take control if needed
        cdp_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cdp Url
          description: >-
            Chrome DevTools Protocol URL. Only needed if you want to connect
            your own automation tools to control the browser
        history_url:
          anyOf:
            - type: string
            - type: 'null'
          title: History Url
          description: >-
            Link to the Altrina platform where you can view live session, action
            history, detailed logs, and take over control
        credits_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Used
          description: Number of credits consumed by this job
        credit_balance:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credit Balance
          description: User's remaining credit balance
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
          description: Creation timestamp (ISO8601)
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
          description: Last updated timestamp (ISO8601)
        downloaded_files:
          anyOf:
            - type: array
              items:
                type: string
            - type: 'null'
          title: Downloaded Files
          description: List of file names downloaded during the browser agent session
      type: object
      required:
        - job_id
        - user_id
        - status
      title: JobStatusResponse
      description: Represents the current state of a job as stored in the jobs table.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Detailed error message
        status_code:
          type: integer
          title: Status Code
          description: HTTP status code
      type: object
      required:
        - detail
        - status_code
      title: ErrorResponse
      description: Standard error response format
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobRunStatus:
      type: string
      enum:
        - provisioning
        - running
        - completed
        - failed
        - user_taken_over
        - paused
      title: JobRunStatus
      description: Possible states of a browser agent job
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        API key for authentication. Get your API key at
        https://app.altrina.com/settings
      scheme: bearer

````