Skip to content

Suggestion: Make API docs more interactive by syncing selected features with live code examples #376

Description

@brahimgb

While exploring the Chat Completion docs (https://docs.mistral.ai/api), I had an idea that might further improve the developer experience. This is a suggestion, and I’m mainly sharing it to open a discussion.

Enhancement explained

When developers explore an API, they often think in terms of “what does the request look like?” rather than reading parameters in isolation.

Today:

  • Parameters and features are documented clearly
  • Code examples are well written, but they mainly cover a general case

This can slow down experimentation, especially for first-time users or developers iterating quickly.

Proposed idea

What if the documentation allowed synchronization between features and code examples?

Concretely:

  • When a user clicks on a parameter or feature in the docs
  • The side panel updates automatically to show:
    • An example in TypeScript, Python, and cURL
    • Any structural or preprocessing changes required
    • The corresponding response

For example, on https://docs.mistral.ai/api, each request body field such as

frequency_penalty, max_tokens, metadata, parallel_tool_calls, etc.

could have its own focused example.

so it will be like: “show me how this is actually called”, instantly.

I’m sharing this as a discussion starter and would love to know whether this kind of feature could be valuable to add, I’d be glad to contribute with an MR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions