Skip to content

Commit 5e1b33e

Browse files
committed
docs(genapi): update content and fix typos
1 parent c77a4cb commit 5e1b33e

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

pages/generative-apis/how-to/use-batch-processing.mdx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ import Requirements from '@macros/iam/requirements.mdx'
1111
Batch processing allows you to submit large volumes of requests to Generative APIs asynchronously, at a discounted price.
1212
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.
1313

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-
2114
<Requirements />
2215

2316
- 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
3831

3932
Example `input.jsonl`:
4033

34+
<Message type="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+
4141
```json
4242
{"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}}
4343
{"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:
109109

110110
### Creating the batch job
111111

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.
114113
2. Click the **Batches** tab.
114+
3. Click **Create batch**. The batch creation wizard opens.
115115

116-
3. Click **Create batch**. The batch creation wizard displays.
116+
<Message type="important">
117+
The Object Storage bucket and the batch job must belong to the same project.
118+
</Message>
117119

118-
4. Provide:
120+
4. Provide the following:
121+
* Input file path (e.g., `s3://scw-managed-genapi-batch/input.jsonl`)
122+
<Message type="tip">
123+
You can upload your `input.jsonl` file directly by clicking **+ Add file**.
124+
</Message>
119125

120-
* The input file path (for example: `s3://scw-managed-genapi-batch/input.jsonl`)
121-
<Message type="tip">
122-
You can also upload your `input.jsonl` file during this step, by clicking **+ Add file**.
123-
</Message>
124-
* The output prefix (optional)
126+
* Output prefix (optional)
125127

126-
5. Click **Create batch**. The batch enters the `Validating` state.
128+
5. Click **Create batch**. The batch job enters the `Validating` state.
127129

128130

129131
### Monitoring the job

0 commit comments

Comments
 (0)