What to include in an AI freelance contract: define the deliverables, acceptance tests, payment milestones, intellectual property rights, data handling rules, approved AI tools, and responsibility for errors. Also cover third-party costs, scope changes, ongoing support, termination, and liability. For US projects, have an attorney review terms involving sensitive data or regulated uses.
Key takeaways
- Describe the workflow being delivered, not just “an AI chatbot” or “an automation.”
- Set measurable acceptance criteria using an agreed test dataset and a clear review deadline.
- Separate ownership of custom code from reusable tools, third-party software, and AI-generated output.
- Assign responsibility for API bills, security, human review, maintenance, and legal compliance.
- Use written change orders when integrations, datasets, or performance requirements change.
- Treat contract templates as starting points, not substitutes for US legal advice.
How should an AI freelance contract define scope and deliverables?
A useful AI development agreement has two layers: general legal terms and a statement of work describing the actual build. The statement of work should let someone unfamiliar with the project determine what is included, what is excluded, and when delivery is complete.
Specify the workflow, integrations, and handoff
- Business workflow: Describe who uses the system and what it does, such as drafting support replies from an approved knowledge base.
- Integrations: Name the systems involved, such as Zendesk, HubSpot, Stripe, or Google Drive, and identify required permissions.
- Deliverables: List source code, deployment configuration, prompts, documentation, tests, and training sessions.
- Exclusions: State whether data cleanup, mobile apps, additional languages, and new integrations are outside scope.
- Client dependencies: Identify who supplies credentials, sample data, feedback, and account access.
For example, “one internal assistant using up to 200 client-approved documents, deployed to one environment” is clearer than “company knowledge AI.” Specify document formats and size limits too: 200 short PDFs and 200 scanned manuals are different jobs.
Keep the signed scope in DocuSign or Dropbox Sign, with implementation tasks in GitHub Issues. As an illustrative budget, a $3,000 prototype might reserve $300 for document preparation. State whether that allowance is included or additional. The main pitfall is allowing project-management tickets to expand the signed scope automatically.
What acceptance criteria should an AI project use?
AI output varies, so “works correctly” is not a sufficient acceptance standard. Separate deterministic requirements, such as successful authentication, from probabilistic requirements, such as whether an answer is supported by source material.
Agree on a test plan before development
- Evaluation dataset: Use a frozen set of representative questions or tasks approved by both parties.
- Scoring: Define correctness, citation quality, refusal behavior, and unacceptable errors.
- Operating conditions: Specify the model version where available, configuration, concurrency, and test environment.
- Review window: Give the client a defined period, such as seven business days, to report failures against the agreed criteria.
- Remedy: State how many correction rounds are included and what happens if acceptance remains disputed.
An illustrative requirement might be “at least 90 of 100 agreed test questions receive a supported answer or an appropriate refusal.” That is a negotiated target, not a claim that every AI application can achieve it. Prohibit meeting the threshold by refusing every question.
Use pytest for software tests and tools such as promptfoo or LangSmith for AI evaluations. Budget evaluation work explicitly: ten hours at an agreed $100 hourly rate is $1,000, excluding API usage. A common pitfall is testing only easy examples or treating a staging result as a permanent production guarantee.
How should pricing, payment milestones, and API costs work?
Match the payment model to uncertainty. A narrowly defined integration may suit fixed pricing; a project with unknown data quality often needs paid discovery first. Avoid committing to a fixed build price before inspecting the inputs.
| Model | Best fit | Illustrative pricing structure | Contract safeguard |
|---|---|---|---|
| Fixed project fee | Stable, testable scope | $6,000 split across three milestones | Define deliverables and change-order pricing |
| Hourly with a cap | Discovery or uncertain integrations | $100 per hour, capped at 20 hours initially | Require written approval before exceeding the cap |
| Monthly retainer | Monitoring and iterative improvements | $1,000 monthly for ten specified hours | Explain rollover, overages, and response windows |
These figures illustrate contract math, not universal market rates or a Tariq Services quote. Add invoice due dates, permitted expenses, suspension rights, and any legally permitted late charges. For milestone billing, define the event that triggers each invoice.
Whenever practical, use client-owned OpenAI, Anthropic, AWS, or Vercel accounts. List model usage, hosting, storage, monitoring, and paid connectors separately from development fees. Establish an initial operating allowance, such as $50–$300 monthly for a low-volume prototype, then validate it against actual usage and current vendor pricing.
Set usage alerts and application-level limits; a billing alert is not necessarily a hard spending cap. US freelancers should also plan for federal income tax and IRS self-employment tax where applicable. An independent-contractor clause alone does not determine worker classification.
Who owns the code, prompts, data, and AI-generated output?
Ownership needs several clauses, not one sentence saying “the client owns everything.” Separate client materials, newly created project assets, the freelancer’s existing materials, and third-party components.
- Client materials: Confirm the client retains rights to its data, branding, and supplied content and has permission to provide them.
- Custom deliverables: Identify the code, prompts, documentation, and configurations assigned or licensed to the client.
- Pre-existing materials: Reserve reusable libraries and frameworks while granting the client enough rights to operate the deliverable.
- Third-party components: Disclose open-source licenses, commercial dependencies, and relevant provider restrictions.
- Transfer timing: State whether ownership transfers on creation, delivery, or full payment, with attorney-reviewed language.
Do not rely solely on “work made for hire.” Under US law, that label does not automatically establish ownership of every freelancer-created asset. An attorney can draft an appropriate assignment and fallback license.
Track dependencies in GitHub and maintain a license inventory. Allow for handoff work: four hours at $100 per hour adds $400 if it is not already included. The key pitfall is promising exclusive copyright in all AI-generated output; US copyright protection depends on human authorship, and provider terms do not establish copyright eligibility.
What data privacy and security terms belong in the agreement?
List what data the application receives, where it goes, how long it stays, and who can access it. “We keep your data secure” does not specify an implementable obligation.
Create a data-handling schedule
- Approved data: Define permitted inputs and prohibit unnecessary Social Security numbers, payment details, or health information.
- Approved vendors: Identify model providers, hosting services, databases, and logging tools.
- Processing rules: Document applicable retention settings and whether provider terms permit training on submitted data.
- Access controls: Require least-privilege access, separate accounts, and a process for revoking credentials.
- Incident handling: Assign notification, investigation, and remediation duties consistent with applicable law.
- Deletion: Cover uploaded files, embeddings, logs, backups, and any technical retention limitations.
Use AWS Secrets Manager or an appropriate managed secret store rather than sharing API keys in Slack. Configure tools such as Sentry to minimize sensitive content in logs. Reserve a specific implementation allowance, such as five hours for access controls and logging configuration; that does not purchase a security audit or compliance certification.
If the project involves protected health information, assess whether HIPAA applies and which business associate agreements are needed before processing begins. US state privacy laws may also require specific processor or service-provider terms. The pitfall is assuming a vendor’s compliance documentation makes your entire application compliant.
How should the contract address AI errors, liability, and human oversight?
Describe foreseeable failure modes: fabricated answers, incorrect classifications, prompt injection, unauthorized actions, and upstream outages. Then assign safeguards to the party that controls each risk.
- Define permitted actions: Distinguish drafting recommendations from sending messages, issuing refunds, or changing records.
- Require approvals: Put human review before consequential or irreversible actions.
- Set boundaries: Identify prohibited uses and explain when the system must escalate rather than answer.
- Allocate responsibility: Separate implementation defects from client instructions, unauthorized modifications, and third-party failures.
- Review legal remedies: Have counsel evaluate warranties, liability limits, indemnities, and appropriate exceptions.
For a HubSpot automation, start with draft-only updates and an approval queue. Include audit logs and a kill switch. Budget safeguards as engineering work: eight hours at $100 per hour is $800, not a free add-on.
A disclaimer should not replace testing or excuse failure to deliver agreed safeguards. Likewise, do not guarantee revenue, perfect accuracy, or uninterrupted vendor availability. Results vary, and earnings depend on effort and market conditions.
If an automation publishes affiliate promotions, assign responsibility for FTC-required disclosure of material connections. Automated publishing does not remove advertising obligations. Indemnity provisions deserve particular care because a broad obligation can create exposure far beyond the project fee.
What should happen when scope changes or the engagement ends?
An AI contract should explain how the relationship changes after the first deployment. New models, new documents, and updated integrations can all alter behavior without changing the visible interface.
Separate defect fixes from ongoing maintenance
Define a defect as a failure to meet the signed specification under agreed conditions. A new Salesforce field, a larger knowledge base, or a replacement model is not automatically a defect. Use GitHub Issues to document requests, but require approval from named contacts before additional paid work begins.
- Change orders: Record the requested change, price, schedule impact, and revised acceptance tests.
- Warranty period: Specify a limited period for correcting covered defects, such as 30 days after acceptance.
- Support: Distinguish response time from resolution time and define business hours and time zone.
- Termination: Address notice, unpaid work, unused prepaid funds, and noncancelable commitments.
- Exit handoff: Deliver agreed repositories, documentation, account access, and data exports; revoke freelancer access afterward.
For example, a $500 monthly maintenance plan could include five hours at a $100 rate, but it should not imply unlimited emergency support. Specify whether migration assistance is included or separately billed. Finally, have counsel review governing law, dispute procedures, confidentiality survival, and enforceability rather than copying these provisions from an unrelated template.
Frequently asked questions
Can I use a standard freelance contract for AI development?
Yes, as a foundation, but add AI-specific terms for evaluations, provider dependencies, data processing, and output limitations. A generic website-development agreement rarely covers autonomous actions or usage-based model costs adequately.
Should the contract name the exact AI model?
Name the initial provider and model where practical, while defining a replacement process if availability or pricing changes. Require approval and appropriate regression testing when a substitution could affect cost, privacy, or performance.
Does every AI freelance project need an NDA?
Not necessarily; an agreement can contain sufficient confidentiality provisions. A separate NDA can help when sensitive information must be shared before the main contract is signed, but it does not replace data-processing or security terms.
Who should pay for testing and failed API calls?
The agreement should allocate development, evaluation, and production usage explicitly. Set an approved testing budget and clarify responsibility for excessive charges caused by defects, misuse, or unauthorized activity.
Is an AI freelance contract legally binding without a lawyer?
A contract can be enforceable without attorney involvement, but enforceability depends on its terms, formation, and applicable law. Obtain legal review for significant commitments, sensitive information, regulated workflows, or substantial liability exposure; this article is general information, not legal advice.
Muhammad Tariq at Tariq Services builds AI products, agents, and automations for US startups. Explore our AI development services to discuss a project with clear deliverables, practical evaluation criteria, and a defined handoff.