Thank you for your interest in contributing to the Venice.ai OpenAPI specification! This document provides guidelines for contributing to this project.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Testing Your Changes
- Submitting Changes
- Style Guidelines
- Documentation Standards
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
This repository contains the OpenAPI 3.0.0 specification for the Venice.ai API. The main specification file is venice.openapi.v3.yaml.
- Documentation improvements: Enhance descriptions, add examples, improve clarity
- Schema updates: Add missing schemas or improve existing ones
- Bug fixes: Correct inaccuracies in the specification
- Example additions: Add more code samples and request/response examples
- Error documentation: Improve error response documentation
- Check existing issues: Look for open issues or create a new one to discuss your proposed changes
- Fork the repository: Create your own fork to work on
- Create a branch: Use a descriptive branch name (e.g.,
fix/chat-completion-schema,docs/add-python-examples) - Make your changes: Follow the guidelines below
- Test your changes: Ensure the specification validates correctly
- Submit a pull request: Provide a clear description of your changes
- Node.js (v14 or higher) - for running linters
- npm - for managing dependencies
- Git - for version control
-
Clone the repository:
git clone https://github.com/Fayeblade1488/venice-API-reference.git cd venice-API-reference -
Install dependencies:
npm install
-
You're ready to make changes!
Always validate your changes before submitting:
-
Run the lint script:
./lint.sh
This runs both Spectral and Redocly linters to check for errors and style issues.
-
Alternative: Run individual linters:
# Spectral lint npm run lint:api:spectral # Redocly lint npm run lint:api:redocly
You can also validate in a browser:
- Go to editor.swagger.io
- Import the
venice.openapi.v3.yamlfile - Check for errors in the right panel
Preview how your changes will look in documentation:
# Using Redoc
npx @redocly/cli build-docs venice.openapi.v3.yaml -o docs/index.html
# Using Swagger UI (Docker)
docker run -p 8080:8080 -e SWAGGER_JSON=/tmp/spec.yaml \
-v "$PWD/venice.openapi.v3.yaml":/tmp/spec.yaml swaggerapi/swagger-ui-
Title: Use a clear, descriptive title
- Good: "Add Python streaming example for chat completions"
- Bad: "Update spec"
-
Description: Include:
- What changes you made
- Why you made them
- Any relevant issue numbers
- Screenshots (if applicable for documentation changes)
-
Validation: Confirm that:
- The specification validates without new errors
- All existing functionality still works
- New examples are accurate and tested
-
Size: Keep PRs focused and reasonably sized
- If making multiple unrelated changes, submit separate PRs
Use clear, descriptive commit messages:
type: brief description
Detailed explanation (if needed)
Fixes #issue_number
Types:
docs:- Documentation changesfeat:- New features or endpointsfix:- Bug fixesrefactor:- Code restructuring without behavior changetest:- Adding or updating testsstyle:- Formatting changes
Examples:
docs: add comprehensive Python examples for chat completions
Added examples showing streaming, function calling, and vision
capabilities using the OpenAI Python library.
Fixes #42
- Indentation: Use 2 spaces (no tabs)
- Line length: Keep lines under 120 characters when possible
- Quotes: Use double quotes for strings
- Arrays: Use bracket notation for short arrays, multiline for long arrays
- Be concise but complete: Provide enough detail to be useful
- Use proper grammar: Full sentences with proper punctuation
- Include examples: Show expected formats and values
- Document constraints: Mention min/max values, required fields, etc.
Every schema property should have:
- type: The data type
- description: What the field represents
- example: A realistic example value
- constraints: Any validation rules (min, max, pattern, enum, etc.)
Example:
temperature:
type: number
minimum: 0
maximum: 2
default: 1
description: |
Controls randomness in the output. Higher values (e.g., 1.5) make output more random,
while lower values (e.g., 0.2) make it more focused and deterministic.
example: 0.8Each endpoint should include:
- summary: Brief one-line description
- description: Detailed explanation of functionality
- parameters: Full documentation of all parameters
- requestBody: Schema with examples
- responses: All possible response codes with examples
- x-codeSamples: Code examples in multiple languages
When adding code samples, include examples in at least these languages:
- cURL: For quick testing
- Python: Using the OpenAI library or requests
- JavaScript: Using fetch or the OpenAI library
Format:
x-codeSamples:
- lang: 'cURL'
label: 'Basic Chat'
source: |
curl -X POST "https://api.venice.ai/api/v1/chat/completions" \
-H "Authorization: Bearer {VENICE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "venice-uncensored",
"messages": [{"role": "user", "content": "Hello!"}]
}'- Always use
{VENICE_API_KEY}as a placeholder in examples - Never commit real API keys
- Mention security best practices in documentation
Document errors with:
- HTTP status code
- Error schema
- Common causes
- How to resolve
- Keep version numbers up to date
- Document breaking changes
- Note deprecated features
If you have questions or need help:
- Open an issue with the
questionlabel - Check existing documentation in the README
- Review the official Venice.ai documentation at https://docs.venice.ai
Your contributions help make the Venice.ai API more accessible and easier to use for everyone. We appreciate your time and effort!