Learn how to access and use Latitude’s API to run your prompts.
Authorization
header of your HTTP requests:
https://gateway.latitude.so/api/v3
Retry-After
: Indicates the number of seconds to wait before making a new request.X-RateLimit-Limit
: The maximum number of requests allowed in the current period.X-RateLimit-Remaining
: The number of requests remaining in the current period.X-RateLimit-Reset
: The timestamp when the rate limit will reset.GET /projects/{projectId}/versions/{versionUuid}/documents/{path}
Path Parameters:
projectId
: Your project ID (required)versionUuid
: Version UUID (required, optional for SDK’s defaults to ‘live’)path
: Path to the document (required)POST /projects/{projectId}/versions/{versionUuid}/documents/get-or-create
Path Parameters:
projectId
: Your project ID (required)versionUuid
: Version UUID (required, optional for SDK’s defaults to ‘live’)path
: Path to the document (required)prompt
: Prompt to use for the document (optional, defaults to empty)POST /projects/{projectId}/versions/{versionUuid}/documents/run
Path Parameters:
projectId
: Your project ID (required)versionUuid
: Version UUID (required, optional for SDK’s defaults to ‘live’)stream
: Optional boolean parameter (defaults to false
). When set to true, the response will be a stream of Server-Sent Events (SSE). If false, a single JSON response containing the last event is returned.stream
is true
: The response is a stream of Server-Sent Events (SSE). Check out the Streaming Events guide for more information about the specific events you can expect.
stream
is false
: A single JSON response is returned with the final event (typically the chain-complete event) in the following structure:
POST /projects/{projectId}/versions/{versionUuid}/documents/run
endpoint can also be used to continue a conversation. Notice all events contain a uuid
field that represents that conversation with the AI. You can use this uuid to continue the conversation.
Endpoint: POST /conversations/{conversationUuid}/chat
Path Parameters:
conversationUuid
: UUID of the conversationstream
: Optional boolean parameter (defaults to false
). When set to true, the response will be a stream of Server-Sent Events (SSE). If false, a single JSON response containing the last event is returned. Check out the Streaming Events guide for more information about the specific events you can expect.POST /conversations/{conversationUuid}/evaluations/{evaluationUuid}/annotate
Path Parameters:
conversationUuid
: UUID of the conversation to annotateevaluationUuid
: UUID of the evaluation to usePOST /projects/{projectId}/versions/{versionUuid}/documents/logs
Path Parameters:
projectId
: Your project ID (required)versionUuid
: Version UUID (required, optional for SDK’s defaults to ‘live’)