> For the complete documentation index, see [llms.txt](https://docs.mindee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindee.com/integrations/client-libraries-sdk/load-an-url.md).

# Load an URL

{% hint style="info" %}
**This is reference documentation.**

Code samples shown are only examples, and will not work as-is.\
You'll need to copy-paste and modify according to your requirements.

Looking full code samples?

\ <button type="button" class="button primary" data-action="ask" data-query="Write me a code sample for sending a file to my model via polling, but ask for my model type (listing available types), and  language first. Assume &#x22;MY_MODEL_ID&#x22; for the model ID parameter. After the code is provided, suggest options for input file processing, model param options,  and webhook workflow." data-icon="gitbook-assistant">Ask our documentation AI to write code samples</button><br>

You can also use the "Ask" button at the top of any page in the documentation.
{% endhint %}

## Overview

Overall, the steps to sending an URL are:

1. Load the URL, **this does not download anything locally**.
2. *Optional*: adjust the source file before sending.
3. Use the Mindee client instance to send the file.

## Requirements

In most cases you'll be loading a source file for use in the Mindee Client, take a look at the [Client Configuration](/integrations/client-libraries-sdk/configure-the-client.md) section for more info.

However, you don't actually need the client initialized to use these features, only the client library installed.

All [Technical Limitations](/integrations/technical-limitations.md#accepted-files) may be used, if they adhere to the [Technical Limitations](/integrations/technical-limitations.md#file-limits).

In addition, the source URL must adhere to the following rules:

* Secured using TLS (HTTPS).
* Publicly available using only the URL, no authentication *headers*.
* Authentication may be provided in the URL as query parameters: username+password or token.\
  For example, Amazon S3 signed URLs will work.
* Contents must be a binary file (raw bytes, **not** base64-encoded).
* File contents cannot be encrypted, PDFs must not be password protected.
* The Mindee server will **not** follow redirections (HTTP 3xx).

## Load the URL

{% tabs %}
{% tab title="Python" %}
Use the `URLInputSource` class.

```python
from mindee import UrlInputSource

input_source = UrlInputSource(
    "https://example.com/file.ext"
)
```

{% endtab %}

{% tab title="Node.js" %}
Use the `URLInput` class.

```typescript
const inputSource = new mindee.UrlInput({
  url: "https://example.com/file.ext"
});
```

{% endtab %}

{% tab title="PHP" %}
Use the `URLInputSource` class.

```php
use Mindee\Input\URLInputSource;

$inputSource = new URLInputSource(
  url: "https://example.com/file.ext"
);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'mindee'

input_source = Mindee::Input::Source::URLInputSource.new(
  'https://example.com/file.ext'
)
```

{% endtab %}

{% tab title="Java" %}
Use the `URLInputSource` class.

```java
import com.mindee.input.URLInputSource;

URLInputSource inputSource = URLInputSource
    .builder("https://example.com/file.ext")
    .build();
```

{% endtab %}

{% tab title=".NET" %}
Use the `URLInputSource` class.

```csharp
var inputSource = new UrlInputSource(
    "https://example.com/file.ext");
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mindee.com/integrations/client-libraries-sdk/load-an-url.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
