In short.
This is a Together AI documentation tutorial for developers who want to turn unstructured documents into validated JSON. It walks through the pipeline of the open-source Self.so resume-to-website app: extract the PDF text, run a safety check, then have a language model produce an object validated with Zod. The main catch is that the code is shown as adapted excerpts with some parts left out, and it depends on Together AI models plus storage and other services. Nothing here was run or tested, and the page does not state costs or licence terms. In detail: pdfjs-dist extracts the text, a one-word safe or unsafe check screens it, then Kimi K3 produces output that matches a Zod schema through the Vercel AI SDK. In the guide's adapted examples the safety classifier is Qwen3.5 9B. The page notes that the linked Self.so source uses Llama Guard 4 for this check and says that model is no longer available on serverless. The result is stored in Upstash Redis and rendered as a site.
Researched and written by an AI model and checked by a second AI model. How it works
This report covers only the complete text of the single documentation page at [https://docs.together.ai/docs/pdf-to-website-with-structured-outputs.md], captured on 15 November 2026. Linked pages are excluded: the Self.so GitHub repository [https://github.com/nutlope/self.so] and its source files, the live Self.so site [https://www.self.so], the Together AI model pages, and the structured outputs, recommended models and Vercel AI SDK documentation. No licence file or notice was captured for the guide or the repository, so rights are unknown. Nothing was run. The code, model behaviour, extraction quality, safety classifier reliability, prices and current model availability were not tested or measured. The notes on the safety check and schema design are inferences from the code excerpts shown.
The overview
What this resource is
This is a single documentation page on the Together AI docs site, titled 'Build a resume-to-website app with structured outputs'. It describes how Self.so [https://www.self.so], an open-source personal site builder, turns an uploaded PDF resume into a typed JSON object that the app renders as a website. The page links to the app's repository at [https://github.com/nutlope/self.so] and names the source file behind each step.
It is a guide, not a software package or a hosted tool. Its value is the explanation and the code excerpts, which teach a reusable pattern: extract the text, screen it, then have a model fill in a schema.
Overall assessment
The page is a focused, practical tutorial. It names the model for each job, the file for each step and the settings used in each call. It explains its design choices rather than only giving code. It also says where it differs from the real repository: it uses Vercel AI SDK v6 and Zod v4, and it replaces Llama Guard 4 with Qwen3.5 9B because the original model is no longer on serverless.
Its limits are those of any guide built from excerpts. The extraction prompt is cut short with a '// ... detailed JSON schema and instructions' comment. A helper named isAllowedPdfUrl is called but not shown. The page also warns that its examples may differ slightly from the linked source files. Treat it as a well-explained blueprint, not a project you can copy and run. No part of it was run for this report.
Who it is for
It suits TypeScript or JavaScript developers who want to learn how to get reliable structured data from a language model. A beginner with some web development experience can follow the data flow, which the page lays out in numbered steps. An experienced developer will get more from the specific details: reasoning turned off through providerOptions, Output.object with a Zod schema, a 15 MB PDF cap, a 15-second timeout and a 4096-token output cap.
It is less useful for readers who work in another language or framework. All code is TypeScript, and the examples assume Vercel's AI SDK. It is also less useful if you need to parse scanned or image-only documents, because the page only describes text extraction. The page does not mention OCR.
What you can learn to build
The page covers four stages. First, upload a PDF to S3 and get a temporary URL. Second, extract plain text with pdfjs-dist, so the raw file never reaches a model. Third, have a small model classify the text as safe or unsafe. Fourth, have Kimi K3, the extraction model, generate a structured resume object and check it against a Zod schema.
The schema in lib/resume.ts has four parts. The header holds name, short bio, location, contact links and skills. There is a summary. Each work experience entry holds company, link, location, contract, title, start, end and description. Each education entry holds school, degree, start and end. The page says the data is then stored in Upstash Redis and the site is rendered from it. It also describes Braintrust spans that record the model, token usage, finish reason and duration, so extraction quality can be tracked and models compared over time.
The page explains its model choices: Qwen3.5 9B handles safety classification because it is small and fast, and Kimi K3 handles extraction because it follows schema instructions reliably. These are the page's own claims. It gives no benchmark or comparison.
Using it
Requirements
The code implies a TypeScript runtime with these packages: Vercel AI SDK v6 (the ai package), the @ai-sdk/togetherai provider, Zod v4, pdfjs-dist and dedent. It also needs a Together AI API key, read from TOGETHER_API_KEY.
The full pipeline also uses S3 for uploads, Upstash Redis to store the structured data and Braintrust for tracing. The page does not say whether Braintrust is optional. It gives no package.json, no versions beyond the major versions of the SDK and Zod, no environment setup and no Node version. The page cannot show whether the named models will stay available on Together AI's serverless offering.
How it works
Text extraction: scrapePdfContent fetches only from approved storage hostnames, downloads the file and rejects anything over 15 MB. It opens the file with pdfjs-dist with isEvalSupported set to false, so JavaScript inside the PDF does not run. It then loops over the pages, joins each page's text items with spaces and returns one string.
Safety check: isFileContentBad sends the extracted text to Qwen3.5 9B with reasoning turned off. The prompt asks for exactly one word, safe or unsafe. The function returns true only if the reply starts with 'unsafe'.
Structured generation: generateResumeObject calls Kimi K3 through generateText, using Output.object with the Zod ResumeDataSchema. It sets maxRetries to 1, a 15,000 ms timeout and maxOutputTokens to 4096, and turns reasoning off. The page explains that Kimi K3 is a hybrid reasoning model with reasoning on by default. Turning it off keeps extraction fast, because the schema does the work that reasoning tokens would otherwise do. Output.object checks the result against the schema.
Setup
The page has no step-by-step install or configuration section. It gives no clone command, .env template, S3 bucket policy, Redis setup or deployment steps. You would need to read the linked repository, which this report did not examine, or build the pipeline yourself from the excerpts.
What it does show is the client setup: createTogetherAI is called with an apiKey taken from process.env.TOGETHER_API_KEY, and each model is chosen by name, for example togetherai('moonshotai/Kimi-K3'). The page does not specify anything beyond that, including the upload flow and the isAllowedPdfUrl allow-list.
Worked example
The page itself is the example. In the safety step, the code calls generateText with the model togetherai('Qwen/Qwen3.5-9B'), the providerOptions { togetherai: { reasoning: { enabled: false } } } and a prompt asking for exactly one word, safe or unsafe, followed by the file content.
In the extraction step, it calls generateText with togetherai('moonshotai/Kimi-K3') and output: Output.object({ schema: ResumeDataSchema }). The prompt begins 'You are an expert resume writer' and ends with '## Resume text:' followed by the extracted text. The function returns the validated output.
The page shows no sample resume, no sample JSON output and no measured results. Its screenshots show the Self.so home page and the upload pipeline. It does not show how well extraction works on real resumes, and the guide's code was not run here.
Assessment & evidence
Limitations and risks
Excerpts only: the main extraction prompt and the isAllowedPdfUrl helper are not shown. The page says the examples are adapted and may differ from the repository.
Safety check design (a reading of the code, not tested): the check reports unsafe only if the reply starts with the exact lowercase text 'unsafe'. Any other reply, such as 'Unsafe', a reply with leading spaces or an unexpected answer, counts as safe. The resume text is also inserted straight into the prompt with nothing marking where it starts and ends, so text in an uploaded document could try to steer the classifier. A one-word verdict from a small model is a light screen, not a full moderation system.
Schema fit (a reading of the schema): link, location and contract are required strings in every work experience entry. If a resume lacks them, a successful validated result must still contain these required strings. The page does not say how missing information or validation failures are handled. It also gives no accuracy figures, no test set and no discussion of unusual layouts.
Input scope: only text extraction is described, so scanned or image-only PDFs may yield little or no text. The page does not address this. Text extraction rejects PDFs over 15 MB. Separately, the structured generation call to Kimi K3 has a 15-second timeout and a 4096-token output cap. These two limits apply to model generation, not to PDF text extraction, and may matter for long resumes.
Privacy: resumes contain personal data. The pipeline sends the text to Together AI models and stores uploads and structured data in third-party services. The page does not discuss retention, consent or data protection.
Why this assessment
The assessment rests on what the page contains: concrete code, named files, stated settings and explicit reasons for each design choice. The tutorial keeps the steps separate, passes text rather than files between them, checks output against a schema and records metrics for each call. These are sound practices that apply to most extraction pipelines, and the page lists them in its closing section.
The model-quality claims come from the Together AI documentation: that Kimi K3 follows schema instructions reliably and that Qwen3.5 9B is small and fast. The page gives no comparative benchmarks, and the claims are unverified here. The notes on the safety check and schema fit are reasoned from the code shown, not from test runs.
Alternatives
The page links to related Together AI material on structured outputs, recommended models and using Together with Vercel's AI SDK. Those pages were not read for this report. For historical context, the page notes that the linked Self.so source uses Llama Guard 4 for the safety check, and says that model is no longer available on serverless.
The page does not compare alternative providers, SDK-free implementations or dedicated document/OCR services; their suitability is unknown from this evidence.
Evidence base
This report is based on the public Together AI documentation page at [https://docs.together.ai/docs/pdf-to-website-with-structured-outputs.md], as captured on 15 November 2026. The notes on the safety check and schema design are readings of the code excerpts on that page, not test results.
Scope limits: the material the page links to was not examined. That includes the Self.so repository and its source files, the linked model pages, the Together AI structured outputs, recommended models and Vercel AI SDK documentation, and the live Self.so site. No code was run. Output quality, latency, cost and model availability were not measured.
Access & freshness
Costs
The page states no prices. The code needs a Together AI API key, read from TOGETHER_API_KEY. The page does not say what the Qwen3.5 9B and Kimi K3 calls cost, how they are billed or whether a free tier exists, so all of this is unknown. The full pipeline also names S3, Upstash Redis and Braintrust. Their prices, billing and free tiers are also unknown from this page.
The only cost-related details are design choices. Reasoning is turned off on both model calls, and the Kimi K3 call caps output at 4096 tokens. For the Kimi K3 call, the page says turning reasoning off keeps extraction fast because the schema does the work that reasoning tokens would otherwise pay for. It does not say how much this saves.
Rights and licence
The captured page does not state a licence for the guide text or its code snippets. It calls Self.so 'open source' and links to the GitHub repository, but it does not name that repository's licence. The licence is therefore unknown from this evidence and was not checked. Before copying code from the page or the repository into your own product, read the repository's licence file and the Together AI documentation terms.
The page is hosted on Mintlify, a documentation platform. The models and services it names have their own terms, which this report does not cover.
Freshness
The captured page shows no publication or last-updated date. It says its examples are adapted from the Self.so source and updated to Vercel AI SDK v6 and Zod v4. It also says the examples use Qwen3.5 9B for the safety check instead of Llama Guard 4, which the linked source uses and which the page says is no longer available on serverless. These notes describe how the examples differ from the source. They do not show when the page was written or revised.
Model availability, model names and SDK interfaces can change. This copy of the page was captured on 15 November 2026. It is unknown whether the named models and options are still current when you read this, or whether the linked repository still matches.
Suggested next steps
If you want to learn the pattern, read the page alongside the linked source files: scrapePdfContent.ts, isFileContentBad.ts, generateResumeObject.ts and resume.ts. Check the repository's licence before reusing any code.
Before building on it, confirm that the named models are available to your Together AI account, check current pricing and test with your own sample resumes. Include scanned PDFs, resumes with missing fields and text that tries to steer the classifier.
If you adapt the safety step, consider matching 'unsafe' regardless of case, clearly marking off the user text in the prompt and using a dedicated moderation model. Because resumes hold personal data, decide how long you will keep data and how you will get consent before storing uploads or extracted data.
