Templates
Templates are reusable building blocks for AI workflows that transform unstructured inputs into structured data.
# What are Templates?
Templates in okdata are schema-based building blocks that define how AI should process various inputs (text, images, PDFs, voice, websites) and convert them into structured data. They allow you to centralize your AI business logic into independent, platform-agnostic, and testable components.
# How Templates Work
- You create a template and give it a name
- You define the desired data output schema
- Users send inputs (files, audio, text)
- The template processes these inputs using AI
- You get structured data that matches your defined schema
# Template Workflow
Create your template by naming it and specifying the data structure you want to receive.
Add custom prompts and select the AI model to optimize performance.
Run your template with sample inputs to verify it works correctly.
Make your template available via API or webhooks for integration.
# Example Template: Geo Guesser
The "Geo Guesser" template demonstrates how to build a city identification system:
- Create a new template named
Geo Guesser
- Add a description explaining the template's purpose
- Define the output schema with fields for city information:

When a user submits an image or text like "the city holding the status of liberty," the template identifies the city and returns structured data according to your schema.
# Benefits of Templates
- Centralizes AI business logic in reusable components
- Ensures consistent, structured outputs from AI
- Platform-agnostic design lets you deploy anywhere
- Easily testable and fine-tunable
- No technical skills required to create and use
- Accessible via simple API calls or webhooks
Ready to create your first template? Continue to Creating Templates.