# Retrieve file status

> Common

Retrieve file details and status by file ID. A `status` of `processed`
means the file is ready to create a batch task. This endpoint can also
query the info of the `output_file_id` / `error_file_id` files when
downloading results.

## Endpoint

`GET https://api.modelverse.cn/v1/files/{file_id}`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| file_id | path | string | Yes | File ID returned by the upload endpoint. |

## Responses

- **200** — File details.
- **404** — File not found or not accessible.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "Batch Tasks - Retrieve File Status",
    "version": "1.0.0",
    "description": "Step 2 of the ModelVerse **OpenAI-compatible Batch async task** flow:\nretrieve file status. After uploading the input file, query its status and\nconfirm `status=processed` before creating the batch task.\nEndpoint: `GET /v1/files/{file_id}`.\n\n> **Note**: The retrieve file status endpoint currently supports GPT-series models only (e.g. `gpt-5-batch`). Batch tasks for other models cannot query file status through this endpoint.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "ModelVerse API endpoint."
    }
  ],
  "tags": [
    {
      "name": "Batch Async Tasks",
      "description": "OpenAI-compatible batch async task APIs."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/files/{file_id}": {
      "get": {
        "tags": [
          "Batch Async Tasks"
        ],
        "operationId": "retrieveBatchFile",
        "summary": "Retrieve file status",
        "description": "Retrieve file details and status by file ID. A `status` of `processed`\nmeans the file is ready to create a batch task. This endpoint can also\nquery the info of the `output_file_id` / `error_file_id` files when\ndownloading results.\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "description": "File ID returned by the upload endpoint.",
            "schema": {
              "type": "string"
            },
            "example": "file-abc123"
          }
        ],
        "responses": {
          "200": {
            "description": "File details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchFileObject"
                },
                "examples": {
                  "success": {
                    "summary": "File processed",
                    "value": {
                      "id": "file-abc123",
                      "object": "file",
                      "bytes": 512,
                      "created_at": 1781600000,
                      "filename": "batch_input.jsonl",
                      "purpose": "batch",
                      "status": "processed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "File not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/BatchError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/BatchError"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Provide the API key via the `Authorization` header as\n`Bearer <your_api_key>`.\n"
      }
    },
    "schemas": {
      "BatchFileObject": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "id",
          "object",
          "bytes",
          "created_at",
          "filename",
          "purpose"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "File ID."
          },
          "object": {
            "type": "string",
            "const": "file",
            "description": "Object type. Always `file`."
          },
          "bytes": {
            "type": "integer",
            "format": "int64",
            "description": "File size in bytes."
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Creation timestamp (seconds)."
          },
          "expires_at": {
            "type": "integer",
            "format": "int64",
            "description": "Expiration timestamp (seconds)."
          },
          "filename": {
            "type": "string",
            "description": "File name."
          },
          "purpose": {
            "type": "string",
            "description": "File purpose; `batch` for a batch input file."
          },
          "status": {
            "type": "string",
            "description": "File status; `processed` means ready.",
            "examples": [
              "processed"
            ]
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "message",
          "type"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message."
          },
          "type": {
            "type": "string",
            "description": "Error type.",
            "examples": [
              "invalid_request_error"
            ]
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error code."
          },
          "param": {
            "type": "string",
            "description": "The offending parameter name or request ID."
          }
        }
      }
    },
    "examples": {
      "BatchError": {
        "summary": "Standard JSON error response",
        "value": {
          "error": {
            "message": "file not found",
            "type": "invalid_request_error",
            "code": "not_found",
            "param": "file_id"
          }
        }
      }
    }
  }
}
```
