← Back to portfolio

Writing Sample

SDK Integration Guide

This sample shows how I write task-oriented integration documentation for developers who need clear sequencing, working code, and practical troubleshooting.

Hero visual for the SDK Integration Guide sample
AudienceApplication developers
Content typeIntegration guide
GoalSuccessful SDK setup
FocusSequencing and troubleshooting

Why this sample matters

SDK documentation should reduce uncertainty during implementation. Developers need to know what prerequisites matter, what order to follow, and what common issues might block them. This kind of guide is most effective when it is concrete, predictable, and easy to scan.

Task goal

In this guide, you install the Fictional Chat SDK, initialize the client, and send your first message.

Before implementation

  • Node.js 18 or later
  • An API key from the developer console
  • A JavaScript or TypeScript project

Step 1. Install the SDK

npm install @fictional/chat-sdk

Step 2. Initialize the client

import { ChatClient } from '@fictional/chat-sdk';

const client = new ChatClient({
  apiKey: process.env.FICTIONAL_API_KEY,
  region: 'global'
});

Step 3. Send a message

const response = await client.messages.create({
  conversationId: 'demo-session',
  message: 'Hello, can you summarize this article?'
});

console.log(response.output);

Common blockers

Issue Possible Cause Resolution
401 Unauthorized Invalid or missing API key Check that FICTIONAL_API_KEY is set correctly.
Connection timeout Network restrictions or wrong region Verify network access and confirm the configured region.
Task completionThe user sees a complete path from install to output.
Reduced ambiguityThe guide clarifies order, assumptions, and expected results.
Support-awareTroubleshooting lowers the chance of users getting blocked early.