Skip to content

docs: Add Batch API tutorial#464

Open
InjunPark-sap wants to merge 22 commits into
mainfrom
batch-api-tutorials
Open

docs: Add Batch API tutorial#464
InjunPark-sap wants to merge 22 commits into
mainfrom
batch-api-tutorials

Conversation

@InjunPark-sap
Copy link
Copy Markdown
Member

What's changed

Add the LLM Batch API tutorial (batch_api.mdx) to the JS docs sidebar.

The tutorial document (docs-js/tutorials/batch_api.mdx) already existed but was not registered in sidebarsDocsJs.js, so it was not visible in local development or production builds.

Changes

  • Add tutorials/using-llm-batch-api to the Tutorials category in sidebarsDocsJs.js

@InjunPark-sap InjunPark-sap self-assigned this Apr 27, 2026
@InjunPark-sap InjunPark-sap changed the title docs: add Batch API tutorial docs: Add Batch API tutorial May 7, 2026
@InjunPark-sap InjunPark-sap requested a review from davidkna-sap May 7, 2026 11:28
@InjunPark-sap
Copy link
Copy Markdown
Member Author

docs: Update batch-api tutorial

Changes

docs-js/tutorials/batch-api.mdx

  • Updated all method names to match the regenerated spec (batchServiceController...listBatches, createBatch, etc.)
  • AI-Resource-Group is now passed as a direct method parameter instead of .addCustomHeaders()
  • Step 5: replaced S3 SDK download approach with FileApi.fileDownload() from @sap-ai-sdk/ai-api
  • Added :::note in Introduction: Batch API currently supports Azure OpenAI models only
  • Removed @aws-sdk/client-s3 from the upload info box (rclone/s3fs-fuse only)
  • Added getBatchById() to the Manage Batch Jobs section

docs-js/foundation-models/openai/batch.mdx (new file)

  • Added a concise API reference page under Foundation Models > OpenAI
  • Covers: create job, poll status, download output with FileApi, and job management
  • Marked as :::experimental

@InjunPark-sap InjunPark-sap marked this pull request as ready for review May 13, 2026 07:05
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Copy link
Copy Markdown
Member

@davidkna-sap davidkna-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have also un-resolved some of my earlier comments.

Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx
Copy link
Copy Markdown
Member Author

@InjunPark-sap InjunPark-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Comment thread docs-js/foundation-models/openai/batch.mdx
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/tutorials/batch-api.mdx
Comment thread docs-js/foundation-models/openai/batch.mdx Outdated
Comment thread docs-js/tutorials/batch-api.mdx Outdated
Co-authored-by: David Knaack <david.knaack@sap.com>
Copy link
Copy Markdown
Member

@davidkna-sap davidkna-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise largely lgtm

npm install @sap-ai-sdk/batch-api @sap-ai-sdk/ai-api @sap-ai-sdk/foundation-models
```

## Step 1 — Configure an Object Store Secret
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pp] These dashes look too wide in headings:

Suggested change
## Step 1 — Configure an Object Store Secret
## Configure an Object Store Secret


Once registered, reference it in your batch job using the `ai://SECRET_NAME/` URI format.

## Step 2 — Prepare the Input File
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 2 — Prepare the Input File
## Prepare the Input File

).execute();
```

## Step 3 — Create a Batch Job
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 3 — Create a Batch Job
## Create a Batch Job

| `CANCELLING` | Cancellation is in progress |
| `CANCELLED` | Job was cancelled |

## Step 5 — Retrieve Results
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 5 — Retrieve Results
## Retrieve Results

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pp] Let's perhaps discuss in what section we want to put this, I feel like it would belong in AI Core services.

Comment on lines +17 to +19
:::experimental
The `@sap-ai-sdk/batch-api` package is experimental and may change at any time without prior notice.
:::
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:::experimental does not exist.

Suggested change
:::experimental
The `@sap-ai-sdk/batch-api` package is experimental and may change at any time without prior notice.
:::
:::caution
The `@sap-ai-sdk/batch-api` package is experimental and may change at any time without prior notice.
:::

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants