Go SDK
SDK Installation
go get github.com/writerai/writer-client-sdk-go
Authentication
Writer authenticates your API requests using your account’s API keys. If you do not include your key when making an API request, or use one that is incorrect or outdated, Writer returns an error.
Your API keys are available in the account dashboard. We include randomly generated API keys in our code examples if you are not logged in. Replace these with your own or log in to see code examples populated with your own API keys.

If you cannot see your secret API keys in the Dashboard, this means you do not have access to them. Contact your Writer account owner and ask to be added to their team as a developer.
SDK Example Usage
package main
import (
"context"
"log"
"github.com/writerai/writer-client-sdk-go"
"github.com/writerai/writer-client-sdk-go/pkg/models/shared"
"github.com/writerai/writer-client-sdk-go/pkg/models/operations"
)
func main() {
s := writerai.New()
req := operations.ContentDetectorAPIRequest{
PathParams: operations.ContentDetectorAPIPathParams{
OrganizationID: 548814,
},
Headers: operations.ContentDetectorAPIHeaders{
Authorization: "deserunt",
},
Request: shared.ContentDetectorRequest{
Input: "porro",
},
}
ctx := context.Background()
res, err := s.AIContentDetector.ContentDetectorAPI(ctx, req)
if err != nil {
log.Fatal(err)
}
if res.ContentDetectorResponses != nil {
// handle response
}
}
SDK Available Operations
AIContentDetector
ContentDetectorAPI
- Content detector api
Billing
GetSubscriptionDetails
- Get your organization subscription details
CoWrite
GenerateContent
- Generate content using predefined templatesGetTemplateInputs
- Get a list of your existing CoWrite templates
Completions
Completions
- Create completion for LLM modelCustomizationCompletions
- Create completion for LLM customization model
Content
ContentCheck
- Check your content against your preset styleguide.ContetnCorrect
- Apply the style guide suggestions directly to your content.
DownloadTheCustomizedModel
FetchCustomizedModelFile
- Download your fine-tuned model (available only for Palmyra Base and Palmyra Large)
Files
DeleteFile
- Delete fileFiles
- List filesGetFile
- Get fileUploadFile
- Upload file
FineTunes
CreateModelCustomization
- Create model customizationCustomizations
- List model customizationsDeleteModelCustomization
- Delete Model customizationGetModelCustomization
- Get model customization
Models
Models
- List available LLM models
Snippet
DeleteSnippets
- Delete snippetsFindSnippets
- Find snippetsUpdateSnippets
- Update snippets
Styleguide
ListPages
- List your styleguide pagesPageDetails
- Page details
Terminology
AddTerms
- Add termsDeleteTerms
- Delete termsFindTerms
- Find termsUpdateTerms
- Update terms
User
ListUsers
- List users
Updated about 2 months ago