Authentication
Vysion uses API keys to allow access to the API. All API requests must include a valid API key in the request headers.
API Key Header
Section titled “API Key Header”Each request must contain the x-api-key
header:
curl "https://api.vysion.ai/api/v2/document/search" \ --header 'Accept: application/json' \ --header 'x-api-key: YOUR_API_KEY'
from vysion import client
# Initialize client with API keyc = client.Client(api_key="YOUR_API_KEY")
# The client automatically handles authentication headersresult = c.search("malware")
Getting Your API Key
Section titled “Getting Your API Key”To obtain an API key:
- Contact us to request developer access
- Provide your use case and organization details
- Receive your unique API key via email
Header Format
Section titled “Header Format”The API key must be included in all requests using this exact header format:
x-api-key: YOUR_API_KEY
Error Responses
Section titled “Error Responses”If authentication fails, you’ll receive one of these error responses:
Missing API Key
Section titled “Missing API Key”{ "error": "API key required", "status": 401}
Invalid API Key
Section titled “Invalid API Key”{ "error": "Invalid API key", "status": 401}
Rate Limit Exceeded
Section titled “Rate Limit Exceeded”{ "error": "Rate limit exceeded", "status": 429, "retry_after": 60}
Best Practices
Section titled “Best Practices”- Keep your API key secure: Never expose it in client-side code or public repositories
- Use environment variables: Store your API key in environment variables, not hardcoded strings
- Monitor usage: Track your API usage to avoid hitting rate limits
- Rotate keys regularly: Contact us to rotate your API keys periodically for security
Rate Limiting
Section titled “Rate Limiting”API requests are subject to rate limiting. See our Rate Limiting guide for more details on limits and best practices.