-
Notifications
You must be signed in to change notification settings - Fork 0
Description
While testing the documented API examples (cURL, TypeScript, and MDX references), I found multiple issues that make several endpoints confusing or non-runnable. Most problems fall into missing required parameters, inconsistent model usage between examples, or examples that depend on resources that are never created.
Below is a breakdown by category.
Chat Completions
cURL
{
"message": "API error occurred: Status 422 Content-Type \"application/json\". Body: {\"detail\":[{\"type\":\"union_tag_not_found\",\"loc\":[\"body\",\"messages\",0],\"msg\":\"Unable to extract tag using discriminator 'role'\",\"input\":{\"content\":\"ipsum eiusmod\"},\"ctx\":{\"discriminator\":\"'role'\"}}]}"
}Issue
messages[0]is missing the requiredrolefield.
FIM Completions
TypeScript
{
"message": "Unable to make request: TypeError: Failed to fetch",
"stack": "ConnectionError: Unable to make request: TypeError: Failed to fetch",
"name": "ConnectionError"
}Issue
- The request includes a
suffixfield that should not be present.
cURL
Issue
- Missing required
modelparameter.
Agents
Issue
- It’s unclear how this endpoint should be used:
- Is an
agent_idrequired? - No agent creation or setup is shown, making the example hard to reproduce.
- Is an
Embeddings
- ✅ Works as expected.
Classifiers
There are multiple inconsistencies between TypeScript and cURL examples:
- TS uses an incorrect model while cURL works
- TS references a non-existent model, while cURL uses a different incorrect model
- Model names differ between TS and cURL (
modelvsmodel-incorrect) - The same issue is repeated across several examples
Files
- List: ✅ Works
- Upload: Works, but the example doesn’t clearly explain the intended use case
- Retrieve / Delete:
- The referenced file does not exist (expected, but confusing)
- cURL examples use placeholder-style values (e.g.
{parameter})
- Download / Signed URL:
- Same issue as above: references non-existent files or placeholders
Fine-tuning
- TypeScript: ✅
- cURL: ✅
However, examples require pre-existing uploaded files, which are not created or referenced in the docs, making them hard to reproduce.
Models
- List: ✅ Works
- Retrieve / other operations:
- Fail because no fine-tuned models exist
- This is expected behavior, but the lack of setup or context is confusing for users
Batch
- TypeScript: ✅
- cURL: ✅
Same limitation as other categories: most endpoints require valid uploaded files to already exist.
OCR
- Example does not provide a valid
documentUrl,file, orimage.
Audio Transcription
- Same issue as OCR: no valid audio file or URL is provided.
Summary
Most issues fall into one of these categories:
- Missing required parameters (
role,model, etc.) - Inconsistent or incorrect model names between TypeScript and cURL
- Examples depending on resources (files, agents, fine-tuned models) that are never created
- Placeholder values that prevent examples from being runnable
Providing consistent parameters, minimal setup steps, and runnable end-to-end examples would significantly improve the developer experience.