You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/generative-apis/how-to/use-batch-processing.mdx
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,6 @@ import Requirements from '@macros/iam/requirements.mdx'
11
11
Batch processing allows you to submit large volumes of requests to Generative APIs asynchronously, at a discounted price.
12
12
Instead of sending requests one by one, you upload an input file to Object Storage and create a batch job. The service processes the requests in the background and writes the results to an output file.
13
13
14
-
Batch processing is designed for:
15
-
16
-
* Large-scale content generation
17
-
* Dataset enrichment
18
-
* Offline inference workloads
19
-
* Cost-optimized asynchronous Processing
20
-
21
14
<Requirements />
22
15
23
16
- A Scaleway account logged into the [console](https://console.scaleway.com)
@@ -38,6 +31,13 @@ Each line of the input file must be a valid JSON object representing a request t
38
31
39
32
Example `input.jsonl`:
40
33
34
+
<Messagetype="note">
35
+
The JSONL file must adhere to the following requirements:
36
+
* The `custom_id` field must be unique for each request.
37
+
* The `method`, `url`, and `model` fields must remain consistent across all requests.
38
+
* The `body` object must comply with the [Generative API documentation](https://www.scaleway.com/en/developers/api/generative-apis/).
39
+
</Message>
40
+
41
41
```json
42
42
{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "mistral-small-3.2-24b-instruct-2506", "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Translate this into French: Hello world!"}],"max_completion_tokens": 500}}
43
43
{"custom_id": "request-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "mistral-small-3.2-24b-instruct-2506", "messages": [{"role": "system", "content": "You are an unhelpful assistant."},{"role": "user", "content": "Write a poem about the ocean."}],"max_completion_tokens": 500}}
@@ -109,21 +109,23 @@ Note that to configure this bucket policy, you need to replace:
109
109
110
110
### Creating the batch job
111
111
112
-
1.1. Click **Generative APIs* in the **AI** section of the side menu. The Generative APIs overview displays.
113
-
112
+
1. In the side menu, navigate to the **AI** section and click **Generative APIs**. The Generative APIs overview page appears.
114
113
2. Click the **Batches** tab.
114
+
3. Click **Create batch**. The batch creation wizard opens.
115
115
116
-
3. Click **Create batch**. The batch creation wizard displays.
116
+
<Messagetype="important">
117
+
The Object Storage bucket and the batch job must belong to the same project.
0 commit comments