> 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/v2/fr/integrations/client-libraries-sdk/load-an-url.md).

# Charger une URL

{% hint style="info" %}
**Il s'agit d'une documentation de référence.**

Les exemples de code affichés sont uniquement des exemples et ne fonctionneront pas tels quels.\
Vous devrez les copier-coller et les modifier selon vos besoins.

Vous cherchez des exemples de code complets ?

\ <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">Demandez à notre IA de documentation de rédiger des exemples de code</button><br>

Vous pouvez également utiliser le bouton « Demander » en haut de n'importe quelle page de la documentation.
{% endhint %}

## Aperçu

Dans l’ensemble, les étapes pour envoyer une URL sont :

1. Charger l’URL, **cela ne télécharge rien localement**.
2. *Facultatif*: ajustez le fichier source avant l’envoi.
3. Utilisez l’instance cliente Mindee pour envoyer le fichier.

## Prérequis

Dans la plupart des cas, vous chargerez un fichier source à utiliser dans le client Mindee ; jetez un œil à la [Configuration du client](/v2/fr/integrations/client-libraries-sdk/configure-the-client.md) section pour plus d’informations.

Cependant, vous n’avez pas réellement besoin d’initialiser le client pour utiliser ces fonctionnalités, seulement d’avoir la bibliothèque cliente installée.

Tous [Limitations techniques](/v2/fr/integrations/technical-limitations.md#accepted-files) peuvent être utilisés, s'ils se conforment à la [Limitations techniques](/v2/fr/integrations/technical-limitations.md#file-limits).

De plus, l'URL source doit respecter les règles suivantes :

* Sécurisé à l'aide de TLS (HTTPS).
* Disponible publiquement en utilisant uniquement l'URL, sans authentification *en-têtes*.
* L'authentification peut être fournie dans l'URL sous forme de paramètres de requête : nom d'utilisateur+mot de passe ou jeton.\
  Par exemple, les URL signées Amazon S3 fonctionneront.
* Le contenu doit être un fichier binaire (octets bruts, **pas** encodé en base64).
* Le contenu du fichier ne peut pas être chiffré, les PDF ne doivent pas être protégés par mot de passe.
* Le serveur Mindee va **pas** suivre les redirections (HTTP 3xx).

## Charger l’URL

{% tabs %}
{% tab title="Python" %}
Utilisez le `URLInputSource` classe.

```python
from mindee import UrlInputSource

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

{% endtab %}

{% tab title="Node.js" %}
Utilisez le `URLInput` classe.

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

{% endtab %}

{% tab title="PHP" %}
Utilisez le `URLInputSource` classe.

```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" %}
Utilisez le `URLInputSource` classe.

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

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

{% endtab %}

{% tab title=".NET" %}
Utilisez le `URLInputSource` classe.

```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/v2/fr/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.
