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

# Upload Image

> upload image to twitter.Need to login first. Trial operation price: $0.001 per call.



## OpenAPI

````yaml POST /twitter/upload_image
openapi: 3.0.1
info:
  title: TwitterAPI.io the most stable/fastest/cheapest twitter api.
  description: Provide the most stable/fastest/cheapest twitter api.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.twitterapi.io
security:
  - ApiKeyAuth: []
paths:
  /twitter/upload_image:
    post:
      description: >-
        upload image to twitter.Need to login first. Trial operation price:
        $0.001 per call.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - auth_session
                - image_url
                - proxy
              properties:
                auth_session:
                  type: string
                  description: >-
                    The session of the login. It's returned by
                    /twitter/login_by_2fa
                image_url:
                  type: string
                  description: The url of the image to upload
                proxy:
                  type: string
                  description: >-
                    The proxy to use.Please use high-quality residential proxies
                    and avoid free proxies.Required.Example:
                    http://username:password@ip:port
      responses:
        '200':
          description: Upload image response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the request.success or error
                  msg:
                    type: string
                    description: Message of the request.error message
                  media_id:
                    type: string
                    description: The id of the uploaded image
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````