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

# Upload File to Arweave

> Fetch a file from a URL and upload it to Arweave permanent storage.

<Note>
  This endpoint requires authentication. Use a bearer token in the `Authorization` header or an API key in the `x-api-key` header.
</Note>

## Overview

Fetches the file at the given `url` and uploads it to Arweave via the Turbo SDK. The upload tier is determined automatically:

* **Free** — files under 5 MB, once per month per artist.
* **Paid** — files 5 MB or larger, or additional uploads beyond the free monthly quota. The USDC cost is debited from the artist's smart wallet.

For paid uploads, ensure the artist's smart wallet has sufficient USDC before calling this endpoint. A `402` response includes the `required` and `available` amounts plus the `smart_wallet` address.

## Example Request

```bash theme={null}
curl -X POST https://api.inprocess.world/api/upload \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/image.jpg" }'
```

## Example Response

```json theme={null}
{
  "uri": "ar://TV4yYVYJ7mwsDZ19h_YNQBtRbLVIr_WITsrBnHxxW30"
}
```


## OpenAPI

````yaml POST /upload
openapi: 3.1.0
info:
  title: In•Process API
  description: >-
    The In•Process API enables browsing and managing moments from timelines.
    Retrieve moments from a specific artist's timeline, browse the in•process
    collective timeline, or filter by collection. The API supports creating
    moments, managing collections, handling payments, and interacting with the
    In•Process protocol ecosystem.
  version: 1.0.0
servers:
  - url: https://api.inprocess.world/api
    description: Production server
security: []
paths:
  /upload:
    post:
      summary: Upload file to Arweave
      description: >-
        Fetch a file from the given URL and upload it to Arweave permanent
        storage. Small files under 5 MB are free once per month per artist;
        larger or additional uploads debit USDC from the artist's smart wallet.
      operationId: uploadFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadRequest'
      responses:
        '200':
          description: File uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient USDC balance in smart wallet
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  required:
                    type: string
                    description: USDC amount required in micros
                  available:
                    type: string
                    description: USDC amount available in micros
                  smart_wallet:
                    type: string
                    description: Artist smart wallet address
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    UploadRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: URL of the file to fetch and upload to Arweave.
          example: https://example.com/image.jpg
    UploadResponse:
      type: object
      required:
        - uri
      properties:
        uri:
          type: string
          description: Arweave URI of the uploaded file.
          example: ar://TV4yYVYJ7mwsDZ19h_YNQBtRbLVIr_WITsrBnHxxW30
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          description: Error status
        message:
          type: string
          description: Error message
        errors:
          type: array
          description: >-
            Optional array of field-level validation errors. Typically included
            in 400 Bad Request responses for validation errors.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                description: The field name that failed validation
              message:
                type: string
                description: The validation error message for this field
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Artist API key for authentication. Get your API key from
        https://inprocess.world/manage/api-keys

````