# Get a job (/docs/api/async/job_get)

Status and result of a queued or async job.

`GET /v1/jobs/{id}`

```json
{
  "operationId": "job_get",
  "summary": "Get a job",
  "description": "Status and result of a queued or async job.",
  "tags": [
    "jobs"
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "pattern": "^job_[a-z0-9]+$"
      },
      "required": true,
      "name": "id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "job"
                ]
              },
              "id": {
                "type": "string"
              },
              "endpoint_id": {
                "type": "string"
              },
              "mode": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running",
                  "pending_upstream",
                  "succeeded",
                  "failed",
                  "expired"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "polls": {
                "type": "integer",
                "minimum": 0
              },
              "result": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "enum": [
                      "call"
                    ]
                  },
                  "id": {
                    "type": "string"
                  },
                  "endpoint_id": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "succeeded",
                      "failed"
                    ]
                  },
                  "hit": {
                    "type": "boolean"
                  },
                  "cost_micro": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "latency_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "credential": {
                    "type": "string",
                    "enum": [
                      "managed",
                      "byok"
                    ]
                  },
                  "data": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "raw": {},
                  "attempts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "endpoint_id": {
                          "type": "string"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "hit",
                            "miss",
                            "failed",
                            "skipped"
                          ]
                        },
                        "cost_micro": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "latency_ms": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "error_code": {
                          "type": "string",
                          "enum": [
                            "invalid_request",
                            "unauthorized",
                            "insufficient_balance",
                            "max_cost_exceeded",
                            "scope_denied",
                            "budget_blocked",
                            "not_found",
                            "idempotency_mismatch",
                            "invalid_meta",
                            "rate_limited",
                            "upstream_error",
                            "response_buffer_limit",
                            "provider_capacity_unavailable",
                            "grid_saturated",
                            "upstream_timeout",
                            "conflict",
                            "internal_error",
                            "account_frozen",
                            "strict_filters",
                            "plan_limit_reached",
                            "validation_failed",
                            "deadline_exceeded",
                            "cancelled",
                            "vendor_key_required"
                          ]
                        }
                      },
                      "required": [
                        "endpoint_id",
                        "provider",
                        "outcome",
                        "cost_micro",
                        "latency_ms"
                      ]
                    }
                  },
                  "meta": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "cache": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "hit",
                          "partial",
                          "miss",
                          "stale",
                          "bypass"
                        ]
                      },
                      "age_s": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0
                      },
                      "fetched_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "saved_micro": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "fields_cached": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "maxItems": 100
                      },
                      "fields_fetched": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "maxItems": 100
                      }
                    },
                    "required": [
                      "status",
                      "age_s",
                      "fetched_at",
                      "saved_micro"
                    ]
                  }
                },
                "required": [
                  "object",
                  "id",
                  "endpoint_id",
                  "provider",
                  "status",
                  "hit",
                  "cost_micro",
                  "latency_ms",
                  "credential",
                  "data",
                  "attempts"
                ]
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled",
                      "vendor_key_required"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "object",
              "id",
              "endpoint_id",
              "mode",
              "status",
              "created_at",
              "updated_at",
              "polls"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled",
                      "vendor_key_required"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
